summaryrefslogtreecommitdiff
path: root/core/io/http_client.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-02-20 04:33:31 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2019-02-20 05:13:51 +0100
commit0e5655694c844f93e1fdd044d873c2661cb00742 (patch)
tree855854f43017b6979ae69dd5a4334c8beb79ca29 /core/io/http_client.h
parent10e48212608f1fa75fed1dade9551408b30f484e (diff)
Fix HTTPClient keep alive with chunked encoding.
We need to consume the trailer part and final CRLF after last chunk as per RFC 7230 section 4.1: ``` chunked-body = *chunk last-chunk trailer-part CRLF ``` We do not return the trailer part, just consume it allowing following requests to work as expected when using keep alive.
Diffstat (limited to 'core/io/http_client.h')
-rw-r--r--core/io/http_client.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/http_client.h b/core/io/http_client.h
index 1ad44d5f01..85ee1959a2 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -172,6 +172,7 @@ private:
bool chunked;
Vector<uint8_t> chunk;
int chunk_left;
+ bool chunk_trailer_part;
int body_size;
int body_left;
bool read_until_eof;