diff options
author | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 22:00:19 +0000 |
---|---|---|
committer | nick@chromium.org <nick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-02 22:00:19 +0000 |
commit | 4dfabfcfe11281e15bc2a37dad0a73de2ec4b5aa (patch) | |
tree | 8888d228d02d867cd84f7aeff5f5e15ba5327e43 /net/http/http_auth_handler_mock.h | |
parent | fae7669f438f42169f9da35406d9b4cef6b541fd (diff) | |
download | chromium_src-4dfabfcfe11281e15bc2a37dad0a73de2ec4b5aa.zip chromium_src-4dfabfcfe11281e15bc2a37dad0a73de2ec4b5aa.tar.gz chromium_src-4dfabfcfe11281e15bc2a37dad0a73de2ec4b5aa.tar.bz2 |
Revert 54528 - Digest authentication uses a uri field to prevent replay attacks.
[Reason for revert: we want to revert r54505, this was a dependent change. cbentzel agrees to reland.]
When authenticating to an HTTP proxy to establish a secure tunnel (via CONNECT), the uri should be the hostname of the server and the destination port, such as "www.example.com:443". When authenticating to an HTTP proxy for a non-secure content, the uri should be the path at the server, i.e. "/index.html".
If the site we are trying to connect to previously advertised "Alternate-Protocol: 443:spdy-npn/1" a request to "http://www.example.com" will be attempted on a secure port.
However, the URL passed into the digest authenticator was an unsecure one, and it decided to have a uri in the form "/index.html" rather than the correct "www.example.com:443". This causes persistent failure with the password and many password prompts.
BUG=49865,50822
TEST=Run with --use-spdy=npn, force connection through a digest authenticating proxy, and browse a site which advertises Alternate-Protocol through http URLs.
Review URL: http://codereview.chromium.org/3028021
TBR=cbentzel@chromium.org
Review URL: http://codereview.chromium.org/3091001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_mock.h')
-rw-r--r-- | net/http/http_auth_handler_mock.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/net/http/http_auth_handler_mock.h b/net/http/http_auth_handler_mock.h index a6b0d48..f9a676c 100644 --- a/net/http/http_auth_handler_mock.h +++ b/net/http/http_auth_handler_mock.h @@ -10,7 +10,6 @@ #include "base/string16.h" #include "base/task.h" -#include "googleurl/src/gurl.h" #include "net/http/http_auth_handler.h" #include "net/http/http_auth_handler_factory.h" @@ -47,23 +46,15 @@ class HttpAuthHandlerMock : public HttpAuthHandler { connection_based_ = connection_based; } - const GURL& request_url() const { - return request_url_; - } - // The Factory class simply returns the same handler each time // CreateAuthHandler is called. class Factory : public HttpAuthHandlerFactory { public: - Factory(); - virtual ~Factory(); + Factory() {} + virtual ~Factory() {} void set_mock_handler(HttpAuthHandler* handler, HttpAuth::Target target); - void set_do_init_from_challenge(bool do_init_from_challenge) { - do_init_from_challenge_ = do_init_from_challenge; - } - virtual int CreateAuthHandler(HttpAuth::ChallengeTokenizer* challenge, HttpAuth::Target target, const GURL& origin, @@ -74,7 +65,6 @@ class HttpAuthHandlerMock : public HttpAuthHandler { private: scoped_ptr<HttpAuthHandler> handlers_[HttpAuth::AUTH_NUM_TARGETS]; - bool do_init_from_challenge_; }; protected: @@ -99,7 +89,6 @@ class HttpAuthHandlerMock : public HttpAuthHandler { std::string* auth_token_; bool first_round_; bool connection_based_; - GURL request_url_; }; } // namespace net |