summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_transaction.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 20:12:45 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 20:12:45 +0000
commite44de5df0a30d8071e2b7d098c78a3de82ebfbf4 (patch)
treef612ced0d7686b83af3a049d11f0d8813ea6b909 /net/http/http_network_transaction.cc
parent9c9811cc39df633c38c01ff1eb99532a3dbed7ba (diff)
downloadchromium_src-e44de5df0a30d8071e2b7d098c78a3de82ebfbf4.zip
chromium_src-e44de5df0a30d8071e2b7d098c78a3de82ebfbf4.tar.gz
chromium_src-e44de5df0a30d8071e2b7d098c78a3de82ebfbf4.tar.bz2
Send the "Proxy-Connection: keep-alive" header with HTTP CONNECT
requests for compatibility with HTTP/1.0 proxies such as Squid. This is required for NTLM authentication. Fix some cpplint.py nits in http_network_transaction_unittest.cc. R=eroman BUG=http://crbug.com/8771 TEST=net_unittests passes all tests Review URL: http://codereview.chromium.org/118316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.cc')
-rw-r--r--net/http/http_network_transaction.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 1ce3da4..f65cabc 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -104,8 +104,10 @@ void BuildTunnelRequest(const HttpRequestInfo* request_info,
const std::string& authorization_headers,
std::string* request_headers) {
// RFC 2616 Section 9 says the Host request-header field MUST accompany all
- // HTTP/1.1 requests.
- *request_headers = StringPrintf("CONNECT %s HTTP/1.1\r\nHost: %s\r\n",
+ // HTTP/1.1 requests. Add "Proxy-Connection: keep-alive" for compat with
+ // HTTP/1.0 proxies such as Squid (required for NTLM authentication).
+ *request_headers = StringPrintf(
+ "CONNECT %s HTTP/1.1\r\nHost: %s\r\nProxy-Connection: keep-alive\r\n",
GetHostAndPort(request_info->url).c_str(),
GetHostAndOptionalPort(request_info->url).c_str());