]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] http: check options before the connection header
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Jan 2010 22:12:12 +0000 (23:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Jan 2010 22:12:12 +0000 (23:12 +0100)
Commit 0dfdf19b6438c2cea47b1dea0442d65bacfc77cf introduced a
regression because the connection header is now parsed and checked
depending on the configured options, but the options are set after
calling it instead of being set before.

src/proto_http.c

index 07e701de9accfd5821309c629a6e3e41947e0ba8..c70543cb717b8b19e6c4092613a8f1199a3303a8 100644 (file)
@@ -2635,12 +2635,12 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
                if ((s->fe->options|s->be->options) & PR_O_FORCE_CLO)
                        tmp = TX_CON_WANT_CLO;
 
-               if (!(txn->flags & TX_CON_HDR_PARS))
-                       http_req_parse_connection_header(txn);
-
                if ((txn->flags & TX_CON_WANT_MSK) < tmp)
                        txn->flags = (txn->flags & ~TX_CON_WANT_MSK) | tmp;
 
+               if (!(txn->flags & TX_CON_HDR_PARS))
+                       http_req_parse_connection_header(txn);
+
                if ((txn->flags & TX_CON_WANT_MSK) != TX_CON_WANT_TUN) {
                        if ((s->fe->options|s->be->options) & PR_O_HTTP_CLOSE)
                                txn->flags = (txn->flags & ~TX_CON_WANT_MSK) | TX_CON_WANT_CLO;