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

Unified Diff: net/url_request/url_request.cc

Issue 893843003: Add RedirectInfo as a redirect parameter to ResourceThrottles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document ResourceThrottle Created 5 years, 10 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
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.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
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index ae0c42c7348bb21a05054aae173da4ef54d09516..b11bec37527d6165f3834bad147e5e6fa48dfcc1 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -466,26 +466,6 @@ void URLRequest::set_method(const std::string& method) {
method_ = method;
}
-// static
-std::string URLRequest::ComputeMethodForRedirect(
- const std::string& method,
- int http_status_code) {
- // For 303 redirects, all request methods except HEAD are converted to GET,
- // as per the latest httpbis draft. The draft also allows POST requests to
- // be converted to GETs when following 301/302 redirects, for historical
- // reasons. Most major browsers do this and so shall we. Both RFC 2616 and
- // the httpbis draft say to prompt the user to confirm the generation of new
- // requests, other than GET and HEAD requests, but IE omits these prompts and
- // so shall we.
- // See: https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-17#section-7.3
- if ((http_status_code == 303 && method != "HEAD") ||
- ((http_status_code == 301 || http_status_code == 302) &&
- method == "POST")) {
- return "GET";
- }
- return method;
-}
-
void URLRequest::SetReferrer(const std::string& referrer) {
DCHECK(!is_pending_);
GURL referrer_url(referrer);
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698