diff options
author | David 'Digit' Turner <digit@android.com> | 2010-07-23 12:45:33 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-07-23 12:45:33 -0700 |
commit | 1fee27e582e9ad9981dd54adad6d47f18a1aae4d (patch) | |
tree | b21ec9a0a209bf4e0b5e7c8ef1b4176fca3c4edc /proxy | |
parent | 43552dc4fa64aad0c9fdb8f4c92ae7ac79406596 (diff) | |
download | external_qemu-1fee27e582e9ad9981dd54adad6d47f18a1aae4d.zip external_qemu-1fee27e582e9ad9981dd54adad6d47f18a1aae4d.tar.gz external_qemu-1fee27e582e9ad9981dd54adad6d47f18a1aae4d.tar.bz2 |
fix -http-proxy implementation to work correctly with chunked encoding.
Change-Id: I3d8a18bd0849c75d0133b234a8aa74069ad71baa
Diffstat (limited to 'proxy')
-rw-r--r-- | proxy/proxy_http_rewriter.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/proxy/proxy_http_rewriter.c b/proxy/proxy_http_rewriter.c index afd929c..7645ecc 100644 --- a/proxy/proxy_http_rewriter.c +++ b/proxy/proxy_http_rewriter.c @@ -751,6 +751,12 @@ rewrite_connection_read_body( RewriteConnection* conn, int fd ) root->name, length); return DATA_ERROR; } + /* proxy_connection_receive_line() did remove the + * trailing \r\n, but we must preserve it when we + * send the chunk size to the proxy. + */ + stralloc_add_str(root->str, "\r\n"); + conn->chunk_length = length; conn->chunk_total = 0; if (length == 0) { |