Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
index 15a360bdb226a5160d48071205357c46d9f58bf6..c363fef44b5a9033651548fd3563c23fde80e528 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
@@ -843,6 +843,18 @@ ResourceRequestBlockedReason FrameFetchContext::canRequestInternal( |
reportingPolicy)) |
return ResourceRequestBlockedReason::MixedContent; |
+ if (url.whitespaceRemoved()) { |
+ Deprecation::countDeprecation( |
+ frame()->document(), UseCounter::CanRequestURLHTTPContainingNewline); |
+ if (url.protocolIsInHTTPFamily()) { |
+ if (RuntimeEnabledFeatures::restrictCanRequestURLCharacterSetEnabled()) |
+ return ResourceRequestBlockedReason::Other; |
+ } else { |
+ UseCounter::count(frame()->document(), |
+ UseCounter::CanRequestURLNonHTTPContainingNewline); |
+ } |
+ } |
+ |
// Let the client have the final say into whether or not the load should |
// proceed. |
DocumentLoader* documentLoader = masterDocumentLoader(); |