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

Unified Diff: net/http/http_proxy_utils.cc

Issue 9148011: Allow chrome to handle 407 auth challenges to CONNECT requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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_proxy_utils.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_proxy_utils.cc
===================================================================
--- net/http/http_proxy_utils.cc (revision 118888)
+++ net/http/http_proxy_utils.cc (working copy)
@@ -7,8 +7,12 @@
#include "base/stringprintf.h"
#include "googleurl/src/gurl.h"
#include "net/base/host_port_pair.h"
+#include "net/base/net_errors.h"
#include "net/base/net_util.h"
+#include "net/http/http_auth_controller.h"
#include "net/http/http_request_info.h"
+#include "net/http/http_response_headers.h"
+#include "net/http/http_response_info.h"
namespace net {
@@ -36,4 +40,16 @@
request_headers->MergeFrom(auth_headers);
}
+int HandleAuthChallenge(HttpAuthController* auth,
+ HttpResponseInfo* response,
+ const BoundNetLog& net_log) {
+ DCHECK(response->headers);
+
+ int rv = auth->HandleAuthChallenge(response->headers, false, true, net_log);
+ response->auth_challenge = auth->auth_info();
+ if (rv == OK)
+ return ERR_PROXY_AUTH_REQUESTED;
+ return rv;
+}
+
} // namespace net
« no previous file with comments | « net/http/http_proxy_utils.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698