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

Unified Diff: net/http/http_response_headers.cc

Issue 1374883002: Add UMAs for checking header values against RFC 7230 in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use StringPiece. Created 5 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
Index: net/http/http_response_headers.cc
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index c535e0ab64e1d815972aede695d53b071770fa96..55dfb6bd71229e53d724fa05f5f189bf89f9e6ae 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -770,6 +770,10 @@ void HttpResponseHeaders::AddHeader(std::string::const_iterator name_begin,
std::string::const_iterator name_end,
std::string::const_iterator values_begin,
std::string::const_iterator values_end) {
+ UMA_HISTOGRAM_BOOLEAN("Net.HttpResponseHeaderValueValidInRFC7230",
+ HttpUtil::IsValidHeaderValueRFC7230(
+ base::StringPiece(values_begin, values_end)));
+
// If the header can be coalesced, then we should split it up.
if (values_begin == values_end ||
HttpUtil::IsNonCoalescingHeader(name_begin, name_end)) {
« no previous file with comments | « net/http/http_request_headers.cc ('k') | net/http/http_util.h » ('j') | net/http/http_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698