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

Unified Diff: net/url_request/url_request.cc

Issue 486015: If we redirect from an https to an http site, ensure that we don't... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « no previous file | net/url_request/url_request_unittest.cc » ('j') | net/url_request/url_request_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 34373)
+++ net/url_request/url_request.cc (working copy)
@@ -459,6 +459,11 @@
method_ = "GET";
upload_ = NULL;
}
+
+ // Suppress the referrer if we're redirecting out of https.
+ if (GURL(referrer_).SchemeIsSecure() && !location.SchemeIsSecure())
+ referrer_.clear();
+
url_ = location;
--redirect_limit_;
« no previous file with comments | « no previous file | net/url_request/url_request_unittest.cc » ('j') | net/url_request/url_request_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698