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

Unified Diff: Source/modules/fetch/FetchHeaderList.cpp

Issue 1018903002: Show deprecation warnings for header values in XHR according to RFC 7230 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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: Source/modules/fetch/FetchHeaderList.cpp
diff --git a/Source/modules/fetch/FetchHeaderList.cpp b/Source/modules/fetch/FetchHeaderList.cpp
index a03e9f3e3d39d1b679f12d5ba463588338253050..2f7c62a47f8015e714a405a5ac33f63710cb28bf 100644
--- a/Source/modules/fetch/FetchHeaderList.cpp
+++ b/Source/modules/fetch/FetchHeaderList.cpp
@@ -6,6 +6,7 @@
#include "modules/fetch/FetchHeaderList.h"
#include "core/fetch/FetchUtils.h"
+#include "core/frame/UseCounter.h"
#include "platform/network/HTTPParsers.h"
#include "wtf/PassOwnPtr.h"
@@ -153,6 +154,11 @@ bool FetchHeaderList::isValidHeaderValue(const String& value)
{
// "A value is a byte sequence that matches the field-value token production
// and contains no 0x0A or 0x0D bytes."
+
+ // Show deprecation warnings and count occurrences of such deprecated header values
+ if (isValidHTTPHeaderValueForFetch(value))
hiroshige 2015/08/27 11:38:08 This should be "if (!isValidHTTPHeaderValueForFetc
shiva.jm 2015/09/01 08:26:51 Done.
shiva.jm 2015/09/01 08:26:51 Done.
+ UseCounter::deprecationMessage(UseCounter::FetchHeaderValue);
hiroshige 2015/08/27 11:38:08 Calling UseCounter::deprecationMessage() does noth
+
return isValidHTTPHeaderValue(value);
}

Powered by Google App Engine
This is Rietveld 408576698