Chromium Code Reviews| Index: net/http/proxy_client_socket.cc |
| diff --git a/net/http/proxy_client_socket.cc b/net/http/proxy_client_socket.cc |
| index 3c539c6895e295a98f9645070e4258bbf78b5d73..3c0d12d5cb2ada770a0e8114c867a44c1fe059fd 100644 |
| --- a/net/http/proxy_client_socket.cc |
| +++ b/net/http/proxy_client_socket.cc |
| @@ -95,9 +95,19 @@ bool ProxyClientSocket::SanitizeProxyAuth(HttpResponseInfo* response) { |
| scoped_refptr<HttpResponseHeaders> new_headers = new HttpResponseHeaders( |
| HttpUtil::AssembleRawHeaders(kHeaders, arraysize(kHeaders))); |
| + // Copy status line and all hop-by-hop headers to preserve keep-alive |
| + // behavior. |
| new_headers->ReplaceStatusLine(old_headers->GetStatusLine()); |
| - CopyHeaderValues(old_headers, new_headers, "Connection"); |
| - CopyHeaderValues(old_headers, new_headers, "Proxy-Authenticate"); |
| + CopyHeaderValues(old_headers, new_headers, "connection"); |
| + CopyHeaderValues(old_headers, new_headers, "proxy-connection"); |
| + CopyHeaderValues(old_headers, new_headers, "keep-alive"); |
| + CopyHeaderValues(old_headers, new_headers, "trailer"); |
| + CopyHeaderValues(old_headers, new_headers, "transfer-encoding"); |
| + CopyHeaderValues(old_headers, new_headers, "upgrade"); |
| + |
| + CopyHeaderValues(old_headers, new_headers, "content-length"); |
|
cbentzel
2015/03/05 02:08:48
As we chatted, main thing I want to make sure is t
|
| + |
| + CopyHeaderValues(old_headers, new_headers, "proxy-authenticate"); |
| response->headers = new_headers; |
| return true; |