Index: net/http/http_stream_request.cc |
diff --git a/net/http/http_stream_request.cc b/net/http/http_stream_request.cc |
index 88e79507337b0ca519a91dd060fb49047b32a385..d2ef98d7fa2380f826ede64cde140921a4ae393d 100644 |
--- a/net/http/http_stream_request.cc |
+++ b/net/http/http_stream_request.cc |
@@ -206,6 +206,11 @@ void HttpStreamRequest::OnNeedsClientAuthCallback( |
delegate_->OnNeedsClientAuth(cert_info); |
} |
+void HttpStreamRequest::OnNeedsTLSLoginCallback( |
+ AuthChallengeInfo* login_info) { |
+ delegate_->OnNeedsTLSLogin(login_info); |
+} |
+ |
void HttpStreamRequest::OnHttpsProxyTunnelResponseCallback( |
const HttpResponseInfo& response_info, |
HttpStream* stream) { |
@@ -279,6 +284,14 @@ int HttpStreamRequest::RunLoop(int result) { |
connection_->ssl_error_response_info().cert_request_info)); |
return ERR_IO_PENDING; |
+ case ERR_TLS_CLIENT_LOGIN_NEEDED: |
+ MessageLoop::current()->PostTask( |
+ FROM_HERE, |
+ method_factory_.NewRunnableMethod( |
+ &HttpStreamRequest::OnNeedsTLSLoginCallback, |
+ connection_->ssl_error_response_info().login_request_info)); |
+ return ERR_TLS_CLIENT_LOGIN_NEEDED; |
+ |
case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: |
{ |
DCHECK(connection_.get()); |
@@ -483,6 +496,7 @@ int HttpStreamRequest::DoInitConnection() { |
alternate_protocol_mode_ == kUsingAlternateProtocol && |
alternate_protocol_ == HttpAlternateProtocols::NPN_SPDY_2; |
using_ssl_ = request_info().url.SchemeIs("https") || |
+ request_info().url.SchemeIs("httpsv") || |
ShouldForceSpdySSL() || want_spdy_over_npn; |
using_spdy_ = false; |
@@ -547,7 +561,8 @@ int HttpStreamRequest::DoInitConnection() { |
if (proxy_info()->is_http() || proxy_info()->is_https()) { |
GURL authentication_url = request_info().url; |
- if (using_ssl_ && !authentication_url.SchemeIs("https")) { |
+ if (using_ssl_ && !authentication_url.SchemeIs("https") && |
+ !authentication_url.SchemeIs("httpsv")) { |
// If a proxy tunnel connection needs to be established due to |
// an Alternate-Protocol, the URL needs to be changed to indicate |
// https or digest authentication attempts will fail. |