]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http: add a new option http-buffer-request
authorWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 20:42:08 +0000 (22:42 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 May 2015 22:10:44 +0000 (00:10 +0200)
commit9fbe18e174a7cb62a3eaeb0755723342ff8d3e65
treeca5bdcf969b848f6504eddde9f90d68397bff639
parent748179eb5a15a09d6295993ccb998da2331c9667
MEDIUM: http: add a new option http-buffer-request

It is sometimes desirable to wait for the body of an HTTP request before
taking a decision. This is what is being done by "balance url_param" for
example. The first use case is to buffer requests from slow clients before
connecting to the server. Another use case consists in taking the routing
decision based on the request body's contents. This option placed in a
frontend or backend forces the HTTP processing to wait until either the whole
body is received, or the request buffer is full, or the first chunk is
complete in case of chunked encoding. It can have undesired side effects with
some applications abusing HTTP by expecting unbufferred transmissions between
the frontend and the backend, so this should definitely not be used by
default.

Note that it would not work for the response because we don't reset the
message state before starting to forward. For the response we need to
1) reset the message state to MSG_100_SENT or BODY , and 2) to reset
body_len in case of chunked encoding to avoid counting it twice.
doc/configuration.txt
include/types/proxy.h
src/cfgparse.c
src/proto_http.c
src/proxy.c