From: Christopher Faulet Date: Tue, 5 May 2020 15:33:25 +0000 (+0200) Subject: DOC: Fix req.body and co documentation to be accurate X-Git-Tag: v2.2-dev8~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af4dc4ccaa27b5f73e451ceca1a15f88196a2898;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 8018d907e5..98424df600 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -17090,10 +17090,9 @@ capture.res.ver : string persistent flag. req.body : binary - This returns the HTTP request's available body as a block of data. It - requires that the request body has been buffered made available using - "option http-buffer-request". In case of chunked-encoded body, currently only - the first chunk is analyzed. + This returns the HTTP request's available body as a block of data. It is + recommended to use "option http-buffer-request" to be sure to wait, as much + as possible, for the request's body. req.body_param([) : string This fetch assumes that the body of the POST request is url-encoded. The user @@ -17110,15 +17109,13 @@ req.body_param([) : string req.body_len : integer 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 - requires that the request body has been buffered made available using - "option http-buffer-request". + is recommended to use "option http-buffer-request" to be sure to wait, as + much as possible, for the request's body. req.body_size : integer 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 - chunk in case of chunked encoding. In order to parse the chunks, it requires - that the request body has been buffered made available using - "option http-buffer-request". + will represent the advertised Content-Length header, or the size of the + available data in case of chunked encoding. req.cook([]) : string cook([]) : string (deprecated)