]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http: implement http-response redirect rules
authorWilly Tarreau <w@1wt.eu>
Fri, 22 May 2015 15:30:48 +0000 (17:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 May 2015 15:45:43 +0000 (17:45 +0200)
commit51d861a44f4c872184d1f7dcc8ef1e1b4793c982
tree982232efd7548b5cd570576913034959c93fa34c
parentbe4653b6d4c835092dacec3a7b2431df9c6704dd
MEDIUM: http: implement http-response redirect rules

Sometimes it's problematic not to have "http-response redirect" rules,
for example to perform a browser-based redirect based on certain server
conditions (eg: match of a header).

This patch adds "http-response redirect location <fmt>" which gives
enough flexibility for most imaginable operations. The connection to
the server is closed when this is performed so that we don't risk to
forward any pending data from the server.

Any pending response data are trimmed so that we don't risk to
forward anything pending to the client. It's harmless to also do that
for requests so we don't need to consider the direction.
doc/configuration.txt
include/types/proto_http.h
src/proto_http.c