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

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: 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..d4b6e2fe17ac0df2c13de59d17a84f9e84772fee 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(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)) {

Powered by Google App Engine
This is Rietveld 408576698