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

Unified Diff: Source/web/AssociatedURLLoader.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/web/AssociatedURLLoader.cpp
diff --git a/Source/web/AssociatedURLLoader.cpp b/Source/web/AssociatedURLLoader.cpp
index bd3345523abea6522eda68cd4b6a00f8e6f467cc..e576cf0d1a5665a95b7858a7a12b4fb84b61a329 100644
--- a/Source/web/AssociatedURLLoader.cpp
+++ b/Source/web/AssociatedURLLoader.cpp
@@ -33,6 +33,7 @@
#include "core/fetch/CrossOriginAccessControl.h"
#include "core/fetch/FetchUtils.h"
+#include "core/frame/UseCounter.h"
#include "core/loader/DocumentThreadableLoader.h"
#include "core/loader/DocumentThreadableLoaderClient.h"
#include "platform/Timer.h"
@@ -69,6 +70,10 @@ private:
void HTTPRequestHeaderValidator::visitHeader(const WebString& name, const WebString& value)
{
+ // Show deprecation warnings and count occurrences of such deprecated header values
+ if (isValidHTTPHeaderValueForFetch(value))
+ UseCounter::deprecationMessage(UseCounter::FetchHeaderValue);
hiroshige 2015/08/27 11:38:08 I think deprecation message here is not needed (or
shiva.jm 2015/09/01 08:26:51 Done.
+
m_isSafe = m_isSafe && isValidHTTPToken(name) && !FetchUtils::isForbiddenHeaderName(name) && isValidHTTPHeaderValue(value);
}
« Source/platform/network/HTTPParsers.cpp ('K') | « Source/platform/network/HTTPParsers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698