]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: http: make keep-alive + httpclose be passive mode
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Jan 2014 23:51:42 +0000 (00:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 30 Jan 2014 02:14:29 +0000 (03:14 +0100)
There's no particular reason for having keep-alive + httpclose combine
into forceclose when set in different frontend/backend sections, since
keep-alive does not close anything by default. Let's have this still
combination remain httpclose only.

src/proto_http.c

index 164faac227c071ac00a220ab2881e54026b3d721..6d60fad9659ed76e45ef32aced59cdc41c16e056 100644 (file)
@@ -3568,8 +3568,8 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
                    (s->be->options & PR_O_HTTP_MODE) == PR_O_HTTP_FCL)
                        tmp = TX_CON_WANT_CLO;
 
-               /* option httpclose + anything other than tunnel => close */
-               if (tmp != TX_CON_WANT_TUN &&
+               /* option httpclose + server_close => forceclose */
+               if (tmp == TX_CON_WANT_SCL &&
                    ((s->fe->options & PR_O_HTTP_MODE) == PR_O_HTTP_PCL ||
                     (s->be->options & PR_O_HTTP_MODE) == PR_O_HTTP_PCL))
                        tmp = TX_CON_WANT_CLO;