summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_http_job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/url_request/url_request_http_job.cc')
-rw-r--r--net/url_request/url_request_http_job.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 6a3535b..d29b31e 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -209,6 +209,12 @@ bool URLRequestHttpJob::IsRedirectResponse(GURL* location,
if (!response_info_->headers->IsRedirect(&value))
return false;
+ // For HTTPS, if we didn't receive a server certificate, the response was
+ // from the proxy server (a response to the CONNECT request) rather than
+ // the server.
+ if (request_->url().SchemeIsSecure() && !response_info_->ssl_info.cert)
+ return false;
+
*location = request_->url().Resolve(value);
*http_status_code = response_info_->headers->response_code();
return true;