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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 8418024: Don't convert HEAD requests to GETs on 303 redirects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Response to comments, part 2 Created 9 years, 2 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
===================================================================
--- net/url_request/url_request_unittest.cc (revision 107962)
+++ net/url_request/url_request_unittest.cc (working copy)
@@ -2473,7 +2473,8 @@
}
// The following tests check that we handle mutating the request method for
-// HTTP redirects as expected. See http://crbug.com/56373.
+// HTTP redirects as expected.
+// See http://crbug.com/56373 and http://crbug.com/102130.
TEST_F(URLRequestTestHTTP, Redirect301Tests) {
ASSERT_TRUE(test_server_.Start());
@@ -2482,6 +2483,7 @@
HTTPRedirectMethodTest(url, "POST", "GET", true);
HTTPRedirectMethodTest(url, "PUT", "PUT", true);
+ HTTPRedirectMethodTest(url, "HEAD", "HEAD", false);
}
TEST_F(URLRequestTestHTTP, Redirect302Tests) {
@@ -2491,6 +2493,7 @@
HTTPRedirectMethodTest(url, "POST", "GET", true);
HTTPRedirectMethodTest(url, "PUT", "PUT", true);
+ HTTPRedirectMethodTest(url, "HEAD", "HEAD", false);
}
TEST_F(URLRequestTestHTTP, Redirect303Tests) {
@@ -2500,6 +2503,7 @@
HTTPRedirectMethodTest(url, "POST", "GET", true);
HTTPRedirectMethodTest(url, "PUT", "GET", true);
+ HTTPRedirectMethodTest(url, "HEAD", "HEAD", false);
}
TEST_F(URLRequestTestHTTP, Redirect307Tests) {
@@ -2509,6 +2513,7 @@
HTTPRedirectMethodTest(url, "POST", "POST", true);
HTTPRedirectMethodTest(url, "PUT", "PUT", true);
+ HTTPRedirectMethodTest(url, "HEAD", "HEAD", false);
}
TEST_F(URLRequestTestHTTP, InterceptPost302RedirectGet) {
« no previous file with comments | « net/url_request/url_request.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698