]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: h1: Correctly report used data with no len.
authorOlivier Houchard <ohouchard@haproxy.com>
Tue, 4 Dec 2018 16:41:58 +0000 (17:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Dec 2018 17:32:39 +0000 (18:32 +0100)
When we have no content-length, and not in chunk mode, correctly
report the used data. We really used "ret", and not "max".

src/mux_h1.c

index cb4341f2a2df088196c18f3e186c5f4e2db9c713..b0d5567000ac5426bb7f9d9c00916a1096f7850c 100644 (file)
@@ -1103,8 +1103,8 @@ static size_t h1_process_data(struct h1s *h1s, struct h1m *h1m, struct htx *htx,
                        if (!htx_add_data(htx, ist2(b_peek(buf, *ofs), ret)))
                                goto end;
 
-                       *ofs += max;
-                       total = max;
+                       *ofs += ret;
+                       total = ret;
                }
        }