]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: Call XFER_DATA analyzer when HTTP txn is switched in tunnel mode
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 28 Nov 2016 13:21:27 +0000 (14:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Nov 2016 16:03:04 +0000 (17:03 +0100)
This allow a filter to start to analyze data in HTTP and to fallback in TCP when
data are tunneled.

[wt: backport desired in 1.7 - no impact right now but may impact the ability
 to backport future fixes]

src/proto_http.c

index 1ba36e7d7a4e88e08d250fc91a57bb7ba07a9eaa..a37e2909fae588d12a146388c8fce76ab983ba9d 100644 (file)
@@ -5598,6 +5598,10 @@ int http_resync_states(struct stream *s)
                s->res.analysers &= AN_FLT_END;
                channel_auto_close(&s->res);
                channel_auto_read(&s->res);
+               if (txn->req.msg_state == HTTP_MSG_TUNNEL && HAS_REQ_DATA_FILTERS(s))
+                       s->req.analysers |= AN_FLT_XFER_DATA;
+               if (txn->rsp.msg_state == HTTP_MSG_TUNNEL && HAS_RSP_DATA_FILTERS(s))
+                       s->res.analysers |= AN_FLT_XFER_DATA;
        }
        else if ((txn->req.msg_state >= HTTP_MSG_DONE &&
                  (txn->rsp.msg_state == HTTP_MSG_CLOSED || (s->res.flags & CF_SHUTW))) ||