Chromium Code Reviews| Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| index 4ec6c06ee3273aa78025da1f4d662b3148431ebc..054faaed26589f917ab5bf3442e8ad7b145000c0 100644 |
| --- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| +++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| @@ -1183,6 +1183,10 @@ void XMLHttpRequest::setRequestHeader(const AtomicString& name, const AtomicStri |
| return; |
| } |
| + // Show deprecation warnings and count occurrences of such deprecated header values |
|
hiroshige
2015/09/01 11:21:18
nit: append '.' at the end of the statement.
shiva.jm
2015/09/01 14:29:11
Done.
|
| + if (!isValidHTTPFieldContentRFC7230(value)) |
|
hiroshige
2015/09/01 11:21:18
After I saw the diff of xmlhttprequest-setrequesth
shiva.jm
2015/09/01 14:29:11
Done.
|
| + UseCounter::countDeprecation(executionContext(), UseCounter::HeaderValueNotMatchingRFC7230); |
| + |
| // No script (privileged or not) can set unsafe headers. |
| if (FetchUtils::isForbiddenHeaderName(name)) { |
| logConsoleError(executionContext(), "Refused to set unsafe header \"" + name + "\""); |