Commit Graph

4 Commits (a627bec679df6b9e91b08f5b0431bf0b91be2f46)

Author SHA1 Message Date
Victor Julien 82177e0eec lua/http: read trailer fields from Lua
Header functions in the Lua http library read the header tables and the raw header
buffer. Once trailer fields moved out of those, a script could no longer see them at
all, and nothing replaced the access: the only way to act on a trailer was a rule.

Add the trailer twins over the tables and blocks the http.trailer buffers use:
tx:request_trailer(), tx:request_trailers(), tx:request_trailers_raw() and the response
versions. Name lookup is case insensitive and reports a miss as an error, like the
header functions. Repeated fields need no merging here: the parser folds them while
storing, so a name has one entry.

HTTP/2 is out of reach of these functions: the Lua http library is driven by htp, so it
has no HTTP/2 transaction to read.

Ticket: #8256.
5 days ago
Victor Julien 4bd1ffd3ae doc: describe the trailer buffers
And say on the header buffers that the trailer section is not part of
them. That is a change in behaviour for chunked traffic carrying
trailers: a rule that happened to match trailer content through
http.header, http.header.raw, http.header_names or a field keyword now
needs the matching trailer buffer.

Ticket: #8256.
5 days ago
Juliana Fajardini 9614770483 doc/lua: document request_host lua lib
Seems that we missed bringing this one, when documenting HTTP lua lib
functions.
1 year ago
Shivani Bhardwaj 65349442f8 doc: add http library supported fns
Task 7604
2 years ago