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

Unified Diff: net/http/http_response_headers.cc

Issue 1481143002: Added HttpUtils::HasValidators and HttpResponse::HasValidators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed loops from the test cases Created 4 years, 10 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
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 2167aac2d820761738380b15f7346cdfc5705cbe..8f8ce9d38aadbda82e308f653327269e7e89d0af 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1248,6 +1248,15 @@ bool HttpResponseHeaders::HasStrongValidators() const {
date_header);
}
+bool HttpResponseHeaders::HasValidators() const {
mmenke 2016/02/25 07:56:45 Erm...Wait...I'm not an expert on validators, but
jamartin 2016/02/25 11:30:49 Yes it should and I believe it is so in this imple
mmenke 2016/02/25 11:41:06 Sorry, I was just confused by the fact this actual
+ std::string etag_header;
+ EnumerateHeader(NULL, "etag", &etag_header);
+ std::string last_modified_header;
+ EnumerateHeader(NULL, "Last-Modified", &last_modified_header);
+ return HttpUtil::HasValidators(GetHttpVersion(), etag_header,
+ last_modified_header);
+}
+
// From RFC 2616:
// Content-Length = "Content-Length" ":" 1*DIGIT
int64_t HttpResponseHeaders::GetContentLength() const {

Powered by Google App Engine
This is Rietveld 408576698