proxy: Fix proxy chunked transfer encoding error.
There was a bug that prevented proper loading of response bodies under
- an http proxy server is configured
- AND the emulator makes an http request (port 80) via the proxy server
- AND the proxy server returns a body with chunked transfer encoding
Loading such a request in the Browser or Chrome would result in an
This change fixes two issues:
1) Incorrectly detecting a chunk data end error when reading the last
'\r\n' of the chunk, due to an incorrect assumption that all prior
data was flushed.
2) The terminating '0\r\n\r\n' chunk was not being sent.
Signed-off-by: Weiyin He <firstname.lastname@example.org>
1 file changed