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

Unified Diff: net/http/http_response_headers.cc

Issue 402107: ChromeFrame's host network stack implementation for IE full tab mode implicit... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « net/http/http_response_headers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_response_headers.cc
===================================================================
--- net/http/http_response_headers.cc (revision 32803)
+++ net/http/http_response_headers.cc (working copy)
@@ -724,12 +724,7 @@
}
bool HttpResponseHeaders::IsRedirect(std::string* location) const {
- // Users probably want to see 300 (multiple choice) pages, so we don't count
- // them as redirects that need to be followed.
- if (!(response_code_ == 301 ||
- response_code_ == 302 ||
- response_code_ == 303 ||
- response_code_ == 307))
+ if (!IsRedirectResponseCode(response_code_))
return false;
// If we lack a Location header, then we can't treat this as a redirect.
@@ -753,6 +748,16 @@
return true;
}
+// static
+bool HttpResponseHeaders::IsRedirectResponseCode(int response_code) {
+ // Users probably want to see 300 (multiple choice) pages, so we don't count
+ // them as redirects that need to be followed.
+ return (response_code == 301 ||
+ response_code == 302 ||
+ response_code == 303 ||
+ response_code == 307);
+}
+
// From RFC 2616 section 13.2.4:
//
// The calculation to determine if a response has expired is quite simple:
« no previous file with comments | « net/http/http_response_headers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698