Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 118316: Send the "Proxy-Connection: keep-alive" header with HTTP CONNECT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
===================================================================
--- net/http/http_network_transaction_unittest.cc (revision 17706)
+++ net/http/http_network_transaction_unittest.cc (working copy)
@@ -29,14 +29,15 @@
return ProxyService::CreateNull();
}
-// Helper to manage the lifetimes of the dependencies for a HttpNetworkTransaction.
+// Helper to manage the lifetimes of the dependencies for a
+// HttpNetworkTransaction.
class SessionDependencies {
public:
// Default set of dependencies -- "null" proxy service.
SessionDependencies() : proxy_service(CreateNullProxyService()) {}
// Custom proxy service dependency.
- SessionDependencies(ProxyService* proxy_service)
+ explicit SessionDependencies(ProxyService* proxy_service)
: proxy_service(proxy_service) {}
scoped_ptr<ProxyService> proxy_service;
@@ -115,7 +116,6 @@
int expected_status);
void ConnectStatusHelper(const MockRead& status);
-
};
// Fill |str| with a long header list that consumes >= |size| bytes.
@@ -953,12 +953,14 @@
// Since we have proxy, should try to establish tunnel.
MockWrite data_writes1[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
// After calling trans->RestartWithAuth(), this is the request we should
// be issuing -- the final header line contains the credentials.
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
"Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n"
"Proxy-Authorization: Basic Zm9vOmJheg==\r\n\r\n"),
};
@@ -1038,7 +1040,7 @@
// Configure against proxy server "myproxy:70".
SessionDependencies session_deps(CreateFixedProxyService("myproxy:70"));
- scoped_refptr<HttpNetworkSession> session( CreateSession(&session_deps));
+ scoped_refptr<HttpNetworkSession> session(CreateSession(&session_deps));
scoped_ptr<HttpTransaction> trans(new HttpNetworkTransaction(
session.get(), &session_deps.socket_factory));
@@ -1051,7 +1053,8 @@
// Since we have proxy, should try to establish tunnel.
MockWrite data_writes[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
};
// The proxy responds to the connect with a 407.
@@ -1106,7 +1109,8 @@
// Since we have proxy, should try to establish tunnel.
MockWrite data_writes[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
};
MockRead data_reads[] = {
@@ -1834,7 +1838,8 @@
// Since we have proxy, should try to establish tunnel.
MockWrite data_writes1[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
};
// The proxy responds to the connect with a 404, using a persistent
@@ -2696,7 +2701,8 @@
MockWrite proxy_writes[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
};
MockRead proxy_reads[] = {
@@ -2706,7 +2712,8 @@
MockWrite data_writes[] = {
MockWrite("CONNECT www.google.com:443 HTTP/1.1\r\n"
- "Host: www.google.com\r\n\r\n"),
+ "Host: www.google.com\r\n"
+ "Proxy-Connection: keep-alive\r\n\r\n"),
MockWrite("GET / HTTP/1.1\r\n"
"Host: www.google.com\r\n"
"Connection: keep-alive\r\n\r\n"),
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698