]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http_htx: Initialize HTX error messages for TCP proxies
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 15 Jul 2019 12:43:38 +0000 (14:43 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 19 Jul 2019 07:18:27 +0000 (09:18 +0200)
Since the HTX is the default mode for all proxies, HTTP and TCP, we must
initialize all HTX error messages for all HTX-aware proxies and not only for
HTTP ones. It is required to support HTTP upgrade for TCP proxies.

This patch must be backported to 2.0.

src/http_htx.c

index cd19d8f8b9b631fddbc1c0e41bdc582854619383..0e788c1d877f09aafb1cc73f68d759128671ac37 100644 (file)
@@ -680,7 +680,7 @@ static int http_htx_init(void)
        int err_code = 0;
 
        for (px = proxies_list; px; px = px->next) {
-               if (px->mode != PR_MODE_HTTP || !(px->options2 & PR_O2_USE_HTX))
+               if (!(px->options2 & PR_O2_USE_HTX))
                        continue;
 
                for (rc = 0; rc < HTTP_ERR_SIZE; rc++) {