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

Unified Diff: net/url_request/url_request_job.cc

Issue 212543005: Do not copy reference fragments for overridden redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months 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/url_request/url_request_job.cc
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 35dbbb1d16c6cbac47105b613c8fda3206b44dcf..4637fcd991b1d8ba351fea1930f59342564ffe10 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -331,19 +331,6 @@ void URLRequestJob::NotifyHeadersComplete() {
// so it does not treat being stopped as an error.
DoneReadingRedirectResponse();
- const GURL& url = request_->url();
mmenke 2014/03/27 14:41:46 This breaks URLRequestRedirectJobs, I believe. Or
-
- // Move the reference fragment of the old location to the new one if the
- // new one has none. This duplicates mozilla's behavior.
- if (url.is_valid() && url.has_ref() && !new_location.has_ref()) {
- GURL::Replacements replacements;
- // Reference the |ref| directly out of the original URL to avoid a
- // malloc.
- replacements.SetRef(url.spec().data(),
- url.parsed_for_possibly_invalid_spec().ref);
- new_location = new_location.ReplaceComponents(replacements);
- }
-
bool defer_redirect = false;
request_->NotifyReceivedRedirect(new_location, &defer_redirect);

Powered by Google App Engine
This is Rietveld 408576698