DOC: Fix req.body and co documentation to be accurate

Because the HTX is the only mode to represent HTTP data, "option
http-request-buffer" is no longer mandatory to have body data. Without this
option, there is no warranty on the body presence. So it is recommanded to use
it. But it is not a requirement. In addition, the note about chunked body is
removed because outdated.
This commit is contained in:
Christopher Faulet 2020-05-05 17:33:25 +02:00
parent aaab0836d9
commit af4dc4ccaa

View File

@ -17090,10 +17090,9 @@ capture.res.ver : string
persistent flag. persistent flag.
req.body : binary req.body : binary
This returns the HTTP request's available body as a block of data. It This returns the HTTP request's available body as a block of data. It is
requires that the request body has been buffered made available using recommended to use "option http-buffer-request" to be sure to wait, as much
"option http-buffer-request". In case of chunked-encoded body, currently only as possible, for the request's body.
the first chunk is analyzed.
req.body_param([<name>) : string req.body_param([<name>) : string
This fetch assumes that the body of the POST request is url-encoded. The user This fetch assumes that the body of the POST request is url-encoded. The user
@ -17110,15 +17109,13 @@ req.body_param([<name>) : string
req.body_len : integer req.body_len : integer
This returns the length of the HTTP request's available body in bytes. It may This returns the length of the HTTP request's available body in bytes. It may
be lower than the advertised length if the body is larger than the buffer. It be lower than the advertised length if the body is larger than the buffer. It
requires that the request body has been buffered made available using is recommended to use "option http-buffer-request" to be sure to wait, as
"option http-buffer-request". much as possible, for the request's body.
req.body_size : integer req.body_size : integer
This returns the advertised length of the HTTP request's body in bytes. It This returns the advertised length of the HTTP request's body in bytes. It
will represent the advertised Content-Length header, or the size of the first will represent the advertised Content-Length header, or the size of the
chunk in case of chunked encoding. In order to parse the chunks, it requires available data in case of chunked encoding.
that the request body has been buffered made available using
"option http-buffer-request".
req.cook([<name>]) : string req.cook([<name>]) : string
cook([<name>]) : string (deprecated) cook([<name>]) : string (deprecated)