proxy: Fix proxy chunked transfer encoding error.
There was a bug that prevented proper loading of response bodies under
these conditions:
- 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
ERR_INCOMPLETE_CHUNKED_ENCODING error.
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.
Change-Id: I68cee8616d19993ed780213e8a38f0c3b3605a29
Signed-off-by: Weiyin He <[email protected]>
1 file changed