Re: [PATCH] DOC: configuration: clarify http-request wait-for-body

2024-01-28 Thread Willy Tarreau
Hi Thayne,

On Sun, Jan 28, 2024 at 10:07:32PM -0700, Thayne McCombs wrote:
> Make it more explicit what happens in the various scenarios that cause
> HAProxy to stop waiting when "http-request wait-for-body" is used.
> 
> Also fix a couple of grammatical errors.
> 
> Fixes: #2410
> Signed-Off-By: Thayne McCombs 

Thank you, this is super clear now. However, one line is over the 80-chars
limit of the doc, and we normally don't edit signed-off patches, so either
you authorize me to move the "following" word to the next line, or I'll ask
you to send an updated version that fixes it ;-)

Thanks!
Willy



[PATCH] DOC: configuration: clarify http-request wait-for-body

2024-01-28 Thread Thayne McCombs
Make it more explicit what happens in the various scenarios that cause
HAProxy to stop waiting when "http-request wait-for-body" is used.

Also fix a couple of grammatical errors.

Fixes: #2410
Signed-Off-By: Thayne McCombs 
---
 doc/configuration.txt | 24 
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/doc/configuration.txt b/doc/configuration.txt
index f9bb147832..5581c7d94f 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -15229,13 +15229,21 @@ wait-for-body time  [ at-least  ]
   Usable in:  TCP RqCon| RqSes| RqCnt| RsCnt|HTTP Req| Res| Aft
 -  |   -  |   -  |   -  |  X |  X |  -
 
-  This will delay the processing of the request or response waiting for the
-  payload for at most  milliseconds. if "at-least" argument is specified,
-  HAProxy stops waiting for the payload when the first  bytes are
-  received. 0 means no limit, it is the default value. Regardless the
-  "at-least" argument value, HAProxy stops to wait if the whole payload is
-  received or if the request buffer is full.  This action may be used as a
-  replacement to "option http-buffer-request".
+  This will delay the processing of the request or response until one of the 
following
+  conditions occurs:
+  - The full request body is received, in which case processing proceeds
+normally.
+  -  bytes have been received, when the "at-least" argument is given and
+ is non-zero, in which case processing proceeds normally.
+  - The request buffer is full, in which case processing proceeds normally. The
+size of this buffer is determined by the "tune.bufsize" option.
+  - The request has been waiting for more than  milliseconds. In this
+case HAProxy will respond with a 408 "Request Timeout" error to the client
+and stop processing the request. Note that if any of the other conditions
+happens first, this timeout will not occur even if the full body has
+not yet been recieved.
+
+  This action may be used as a replacement for "option http-buffer-request".
 
   Arguments :
 
@@ -15244,7 +15252,7 @@ wait-for-body time  [ at-least  ]
 
is optional. It is the minimum payload size to receive to stop to
   wait. It follows the HAProxy size format and is expressed in
-  bytes.
+  bytes. A value of 0 (the default) means no limit.
 
   Example:
 http-request wait-for-body time 1s at-least 1k if METH_POST
-- 
2.43.0