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

Unified Diff: net/url_request/url_request_redirect_job.h

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_redirect_job.h
===================================================================
--- net/url_request/url_request_redirect_job.h (revision 169969)
+++ net/url_request/url_request_redirect_job.h (working copy)
@@ -19,7 +19,9 @@
class NET_EXPORT URLRequestRedirectJob : public URLRequestJob {
public:
// Valid status codes for the redirect job. Other 30x codes are theoretically
- // valid, but unused so far.
+ // valid, but unused so far. Both 302 and 307 are temporary redirects, with
+ // the difference being that 302 converts POSTs to GETs and removes upload
+ // data.
enum StatusCode {
REDIRECT_302_FOUND = 302,
REDIRECT_307_TEMPORARY_REDIRECT = 307,
@@ -28,14 +30,9 @@
// Constructs a job that redirects to the specified URL.
URLRequestRedirectJob(URLRequest* request,
NetworkDelegate* network_delegate,
- const GURL& redirect_destination);
+ const GURL& redirect_destination,
+ StatusCode http_status_code);
- // Change the HTTP status code to use for the redirect. Default is
- // REDIRECT_302_FOUND.
- void set_redirect_code(StatusCode code) {
- http_status_code_ = static_cast<int>(code);
- }
-
virtual void Start() OVERRIDE;
virtual bool IsRedirectResponse(GURL* location,
int* http_status_code) OVERRIDE;
@@ -45,8 +42,8 @@
void StartAsync();
- GURL redirect_destination_;
- int http_status_code_;
+ const GURL redirect_destination_;
+ const int http_status_code_;
base::WeakPtrFactory<URLRequestRedirectJob> weak_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698