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.
This commit is contained in:
Fabio Alessandrelli
2019-02-20 04:33:31 +01:00
parent 10e4821260
commit 0e5655694c
2 changed files with 29 additions and 2 deletions
+1
View File
@@ -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;