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

Unified Diff: net/url_request/url_request.cc

Issue 500129: Merge 34751 - If we redirect from an https to an http site, ensure that we do... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/249/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') | no next file with comments »
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 34934)
+++ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698