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

Unified Diff: net/spdy/spdy_proxy_client_socket.cc

Issue 8502024: Allow chrome to handle 407 auth challenges to CONNECT requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove inline virtuals Created 9 years, 1 month 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
Index: net/spdy/spdy_proxy_client_socket.cc
===================================================================
--- net/spdy/spdy_proxy_client_socket.cc (revision 108933)
+++ net/spdy/spdy_proxy_client_socket.cc (working copy)
@@ -63,6 +63,19 @@
return response_.headers ? &response_ : NULL;
}
+int SpdyProxyClientSocket::RestartWithAuth(OldCompletionCallback* callback) {
+ // A SPDY Stream can only handle a single request, so the underlying
+ // stream may not be reused and a new SpdyProxyClientSocket must be
+ // created (possibly on top of the same SPDY Session).
+ next_state_ = STATE_DISCONNECTED;
+ return OK;
+}
+
+const
+scoped_refptr<HttpAuthController>& SpdyProxyClientSocket::auth_controller() {
+ return auth_;
+}
+
HttpStream* SpdyProxyClientSocket::CreateConnectResponseStream() {
DCHECK(response_stream_.get());
return response_stream_.release();
@@ -384,7 +397,13 @@
if (response_.headers->response_code() == 200) {
return OK;
} else if (response_.headers->response_code() == 407) {
- return ERR_TUNNEL_CONNECTION_FAILED;
+ int rv =
cbentzel 2011/11/14 22:11:53 Is there any way to share this with HttpProxyClien
Ryan Hamilton 2011/11/14 23:53:40 Done. I added a new HandleAuthChallenge method to
+ auth_->HandleAuthChallenge(response_.headers, false, true, net_log_);
cbentzel 2011/11/14 22:11:53 Nit: maybe easier to read as int rv = auth_->Han
Ryan Hamilton 2011/11/14 23:53:40 Done. (Heh, and then I moved the code, and it now
+ response_.auth_challenge = auth_->auth_info();
+ if (rv == OK)
+ return ERR_PROXY_AUTH_REQUESTED;
+
+ return rv;
} else {
// Immediately hand off our SpdyStream to a newly created SpdyHttpStream
// so that any subsequent SpdyFrames are processed in the context of

Powered by Google App Engine
This is Rietveld 408576698