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

Unified Diff: net/url_request/url_request_http_job.cc

Issue 3453021: Immediately reject empty cookie headers. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: updates Created 10 years, 3 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_response_headers.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_http_job.cc
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 11df1d059f656912f64c22d73140b6b47edb18da..a3e88ab52b8b880a86ca6b2a923692a70d86c334 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -793,8 +793,10 @@ void URLRequestHttpJob::FetchResponseCookies(
std::string value;
void* iter = NULL;
- while (response_info->headers->EnumerateHeader(&iter, name, &value))
- cookies->push_back(value);
+ while (response_info->headers->EnumerateHeader(&iter, name, &value)) {
+ if (!value.empty())
+ cookies->push_back(value);
+ }
}
class HTTPSProberDelegate : public net::HTTPSProberDelegate {
« no previous file with comments | « net/http/http_response_headers.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698