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

Unified Diff: net/http/http_util_unittest.cc

Issue 51004: Respect cookies set in a 401 responses when restarting the http transaction.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address rest of wtc's comments (had missed some in previous patchset) Created 11 years, 9 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/http/http_util.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util_unittest.cc
===================================================================
--- net/http/http_util_unittest.cc (revision 12402)
+++ net/http/http_util_unittest.cc (working copy)
@@ -34,6 +34,29 @@
}
}
+TEST(HttpUtilTest, StripHeaders) {
+ static const char* headers =
+ "Origin: origin\r\n"
+ "Content-Type: text/plain\r\n"
+ "Cookies: foo1\r\n"
+ "Custom: baz\r\n"
+ "COOKIES: foo2\r\n"
+ "Server: Apache\r\n"
+ "OrIGin: origin2\r\n";
+
+ static const char* header_names[] = {
+ "origin", "content-type", "cookies"
+ };
+
+ static const char* expected_stripped_headers =
+ "Custom: baz\r\n"
+ "Server: Apache\r\n";
+
+ EXPECT_EQ(expected_stripped_headers,
+ HttpUtil::StripHeaders(headers, header_names,
+ arraysize(header_names)));
+}
+
TEST(HttpUtilTest, HeadersIterator) {
std::string headers = "foo: 1\t\r\nbar: hello world\r\nbaz: 3 \r\n";
« no previous file with comments | « net/http/http_util.cc ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698