]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: proto_htx: Send outgoing data to client to start response processing
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 28 Nov 2018 15:44:44 +0000 (16:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:20:36 +0000 (17:20 +0100)
In http_wait_for_response(), we wait that all outgoing data have really been
sent (from the channel's point of view) to start the processing of the
response. In fact, it is used to send all intermediate 10x responses. For now
the HTX api is not really handy when multiple messages are stored in the HTX
structure.

src/proto_htx.c

index 852034732c18999690a2397d3038efc38f37b49c..00712d3cd83d72545b3fdc8c073013540ffd63ca 100644 (file)
@@ -1450,7 +1450,7 @@ int htx_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
         * we should only check for HTTP status there, and check I/O
         * errors somewhere else.
         */
-       if (unlikely(htx_is_empty(htx) || htx_get_tail_type(htx) < HTX_BLK_EOH)) {
+       if (unlikely(co_data(rep) || htx_is_empty(htx) || htx_get_tail_type(htx) < HTX_BLK_EOH)) {
                /*
                 * First catch invalid response
                 */