]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] http: balance url_param did not work with first parameters on POST
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Mar 2011 19:35:49 +0000 (20:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 1 Mar 2011 19:42:20 +0000 (20:42 +0100)
commit61a21a34daf09606e3669fd6eec67f633badb2bb
tree1a69a2a049f1ae3f7ebe89dbda5dfb9f869c1ed6
parent124d99181cb878ed62986c3eae3d40d19c48caee
[BUG] http: balance url_param did not work with first parameters on POST

Bryan Talbot reported that POST requests with a query string were not
correctly processed if the hash parameter was the first one, because
the delimiter that was looked for to trigger the parsing was '&' instead
of '?'.

Also, while checking the code, it became apparent that it was enough for
a query string to be present in the request for POST parameters to be
ignored, even if the url_param was in the body and not in the URL.

The code has then been fixed like this :
   1) look for URL param. If found, return it.
   2) if no URL param was found and method is POST, then look it up into
      the body

The code now seems to pass all request combinations.

This patch must be backported to 1.4 since 1.4 is equally broken right now.
doc/configuration.txt
src/backend.c
src/proto_http.c