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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 11420013: POSTs to HSTS domains are no longer converted to GETs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix breakage Created 8 years, 1 month 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_http_job.cc
===================================================================
--- net/url_request/url_request_http_job.cc (revision 169969)
+++ net/url_request/url_request_http_job.cc (working copy)
@@ -211,8 +211,12 @@
}
GURL redirect_url;
- if (request->GetHSTSRedirect(&redirect_url))
- return new URLRequestRedirectJob(request, network_delegate, redirect_url);
+ if (request->GetHSTSRedirect(&redirect_url)) {
+ return new URLRequestRedirectJob(
+ request, network_delegate, redirect_url,
+ // Use status code 307 to preserve the method, so POST requests work.
+ URLRequestRedirectJob::REDIRECT_307_TEMPORARY_REDIRECT);
+ }
return new URLRequestHttpJob(request,
network_delegate,
request->context()->http_user_agent_settings());

Powered by Google App Engine
This is Rietveld 408576698