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

Unified Diff: net/http/http_util.h

Issue 1481143002: Added HttpUtils::HasValidators and HttpResponse::HasValidators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarified the documentation 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
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.h
diff --git a/net/http/http_util.h b/net/http/http_util.h
index 13209b8f421fd5bfb7a78e4ff407807302215e0b..4e2cc1d87dc317d596ba0e8f450b3b5e45e08538 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -205,11 +205,20 @@ class NET_EXPORT HttpUtil {
// Returns true if the parameters describe a response with a strong etag or
// last-modified header. See section 13.3.3 of RFC 2616.
+ // An empty string should be passed for missing headers.
static bool HasStrongValidators(HttpVersion version,
const std::string& etag_header,
const std::string& last_modified_header,
const std::string& date_header);
+ // Returns true if this response has any validator (either a Last-Modified or
+ // an ETag) regardless of whether it is strong or weak. See section 13.3.3 of
+ // RFC 2616.
+ // An empty string should be passed for missing headers.
+ static bool HasValidators(HttpVersion version,
+ const std::string& etag_header,
+ const std::string& last_modified_header);
+
// Gets a vector of common HTTP status codes for histograms of status
// codes. Currently returns everything in the range [100, 600), plus 0
// (for invalid responses/status codes).
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698