]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http: unbreak uri/header/url_param hashing
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Jun 2016 09:52:08 +0000 (11:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Jun 2016 09:57:06 +0000 (11:57 +0200)
commit9962f8fc44dc9033ee076073c49bb826679d027b
tree9a7849a9e96b037f52f1b8144fb46d5edbc44d7a
parent08d35deada4d05e7ee105acf0b09f192b4a5c9ad
BUG/MEDIUM: http: unbreak uri/header/url_param hashing

Vedran Furac reported that "balance uri" doesn't work anymore in recent
1.7-dev versions. Dragan Dosen found that the first faulty commit was
dbe34eb ("MEDIUM: filters/http: Move body parsing of HTTP messages in
dedicated functions"), merged in 1.7-dev2.

After this patch, the hashing is performed on uninitialized data,
indicating that the buffer is not correctly rewound. In fact, all forms
of content-based hashing are broken since the commit above. Upon code
inspection, it appears that the new functions http_msg_forward_chunked_body()
and http_msg_forward_body() forget to rewind the buffer in the success
case, when the parser changes to state HTTP_MSG_DONE. The rewinding code
was reinserted in both functions and the fix was confirmed by two test,
with and without chunking.

No backport it needed.
src/proto_http.c