]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http: Keep the same behavior between 1.6 and 1.7 for tunneled txn
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 29 Nov 2016 13:49:54 +0000 (14:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Nov 2016 16:03:01 +0000 (17:03 +0100)
commit3235957685f2eb4797a302a773a0f8776f068463
tree35751aab83fa1a38d5c38a3af0fd1fd6ed31f44e
parentd1cd209b21865c69761e4d5005a9f36423a38479
BUG/MINOR: http: Keep the same behavior between 1.6 and 1.7 for tunneled txn

In HAProxy 1.6, When "http-tunnel" option is enabled, HTTP transactions are
tunneled as soon as possible after the headers parsing/forwarding. When the
transfer length of the response can be determined, this happens when all data
are forwarded. But for responses with an undetermined transfer length this
happens when headers are forwarded. This behavior is questionable, but this is
not the purpose of this fix...

In HAProxy 1.7, the first use-case works like in 1.6. But the second one not
because of the data filtering. HAProxy was always trying to forward data until
the server closes the connection. So the transaction was never switched in
tunnel mode. This is the expected behavior when there is a data filter. But in
the default case (no data filter), it should work like in 1.6.

This patch fixes the bug. We analyze response data until the server closes the
connection only when there is a data filter.

[wt: backport needed in 1.7]
src/proto_http.c