]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: http: Return an error when a replace-header rule failed on the response
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Feb 2017 11:41:31 +0000 (12:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Feb 2017 18:08:38 +0000 (19:08 +0100)
commitcdade94cf52886167979195af64b403360539db4
tree503b1f0375d0c748119c695554517ebfb4e65678
parent07a0fecced4a194c79c564f12fedfe9ca732713d
BUG/MINOR: http: Return an error when a replace-header rule failed on the response

Historically, http-response rules couldn't produce errors generating HTTP
responses during their evaluation. This possibility was "implicitly" added with
http-response redirect rules (51d861a4). But, at the time, replace-header rules
were kept untouched. When such a rule failed, the rules processing was just
stopped (like for an accept rule).

Conversely, when a replace-header rule fails on the request, it generates a HTTP
response (400 Bad Request).

With this patch, errors on replace-header rule are now handled in the same way
for HTTP requests and HTTP responses.

This patch should be backported in 1.7 and 1.6.
src/proto_http.c