summaryrefslogtreecommitdiffstats
path: root/net/spdy
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:01:19 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-28 16:01:19 +0000
commit60390d08ca58b164594272e3607604b28dd7016b (patch)
tree4672e6587275d54d5c9a66af2c11770996a3b402 /net/spdy
parenta6f0365ee0fc41d58422ccc90e222899d5d90e55 (diff)
downloadchromium_src-60390d08ca58b164594272e3607604b28dd7016b.zip
chromium_src-60390d08ca58b164594272e3607604b28dd7016b.tar.gz
chromium_src-60390d08ca58b164594272e3607604b28dd7016b.tar.bz2
HttpAuthHandlerFactory::CreateDefault requires a HostResolver argument.
Previously the default registry factory would crash if it saw a Negotiate header when trying to do a CNAME lookup because of a NULL resolver. Since then I've changed HttpAuthHandlerNegotiate to skip the CNAME lookup step when the resolver_ is NULL. So, one option is to make CreateDefault accept an optional HostResolver argument. My concern is that since passing in NULL is the easier choice, people will do it and encounter user problems when going through a Negotiate proxy. Hence, I force the correct behavior. BUG=56819 TEST=net_unittests, try fetch client through a Negotiate authenticating proxy. Review URL: http://codereview.chromium.org/3447027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60791 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy')
-rw-r--r--net/spdy/spdy_test_util.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/spdy/spdy_test_util.h b/net/spdy/spdy_test_util.h
index c30cb5c..be2f7d0 100644
--- a/net/spdy/spdy_test_util.h
+++ b/net/spdy/spdy_test_util.h
@@ -248,7 +248,6 @@ spdy::SpdyFrame* ConstructSpdyGetSynReply(const char* const extra_headers[],
// Returns a SpdyFrame.
spdy::SpdyFrame* ConstructSpdyGetSynReplyRedirect(int stream_id);
-
// Constructs a standard SPDY POST SYN packet.
// |extra_headers| are the extra header-value pairs, which typically
// will vary the most between calls.
@@ -304,7 +303,8 @@ class SpdySessionDependencies {
ssl_config_service(new SSLConfigServiceDefaults),
socket_factory(new MockClientSocketFactory),
deterministic_socket_factory(new DeterministicMockClientSocketFactory),
- http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault()),
+ http_auth_handler_factory(
+ HttpAuthHandlerFactory::CreateDefault(host_resolver)),
spdy_session_pool(new SpdySessionPool(NULL)) {
// Note: The CancelledTransaction test does cleanup by running all
// tasks in the message loop (RunAllPending). Unfortunately, that
@@ -322,9 +322,11 @@ class SpdySessionDependencies {
ssl_config_service(new SSLConfigServiceDefaults),
socket_factory(new MockClientSocketFactory),
deterministic_socket_factory(new DeterministicMockClientSocketFactory),
- http_auth_handler_factory(HttpAuthHandlerFactory::CreateDefault()),
+ http_auth_handler_factory(
+ HttpAuthHandlerFactory::CreateDefault(host_resolver)),
spdy_session_pool(new SpdySessionPool(NULL)) {}
+ // NOTE: host_resolver must be ordered before http_auth_handler_factory.
scoped_refptr<MockHostResolverBase> host_resolver;
scoped_refptr<ProxyService> proxy_service;
scoped_refptr<SSLConfigService> ssl_config_service;
@@ -365,7 +367,8 @@ class SpdyURLRequestContext : public URLRequestContext {
proxy_service_ = ProxyService::CreateDirect();
spdy_session_pool_ = new SpdySessionPool(NULL);
ssl_config_service_ = new SSLConfigServiceDefaults;
- http_auth_handler_factory_ = HttpAuthHandlerFactory::CreateDefault();
+ http_auth_handler_factory_ = HttpAuthHandlerFactory::CreateDefault(
+ host_resolver_);
http_transaction_factory_ = new net::HttpCache(
new HttpNetworkLayer(&socket_factory_,
host_resolver_,