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

Unified Diff: net/url_request/url_request.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/tools/testserver/testserver.py ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
===================================================================
--- net/url_request/url_request.cc (revision 12402)
+++ net/url_request/url_request.cc (working copy)
@@ -351,26 +351,8 @@
"content-length",
"origin"
};
-
- std::string stripped_headers;
- net::HttpUtil::HeadersIterator it(headers.begin(), headers.end(), "\r\n");
-
- while (it.GetNext()) {
- bool is_post_specific = false;
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPostHeaders); ++i) {
- if (LowerCaseEqualsASCII(it.name_begin(), it.name_end(),
- kPostHeaders[i])) {
- is_post_specific = true;
- break;
- }
- }
- if (!is_post_specific) {
- // Assume that name and values are on the same line.
- stripped_headers.append(it.name_begin(), it.values_end());
- stripped_headers.append("\r\n");
- }
- }
- return stripped_headers;
+ return net::HttpUtil::StripHeaders(
+ headers, kPostHeaders, arraysize(kPostHeaders));
}
int URLRequest::Redirect(const GURL& location, int http_status_code) {
« no previous file with comments | « net/tools/testserver/testserver.py ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698