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

Unified Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 347653003: XMLHttpRequest must build a request using the given method as-is for non-standard types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update review comments and rebase Created 6 years, 6 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
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 77fba6242f36756aa4b12327736e54949ed0660e..305774dd0cfad72816dff90796dfd41f87cea206 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -504,22 +504,15 @@ bool XMLHttpRequest::isAllowedHTTPMethod(const String& method)
AtomicString XMLHttpRequest::uppercaseKnownHTTPMethod(const AtomicString& method)
{
+ // Valid methods per step-5 of http://xhr.spec.whatwg.org/#the-open()-method.
const char* const methods[] = {
- "COPY",
"DELETE",
"GET",
"HEAD",
- "INDEX",
- "LOCK",
- "M-POST",
- "MKCOL",
- "MOVE",
"OPTIONS",
"POST",
- "PROPFIND",
- "PROPPATCH",
- "PUT",
- "UNLOCK" };
+ "PUT" };
+
for (unsigned i = 0; i < WTF_ARRAY_LENGTH(methods); ++i) {
if (equalIgnoringCase(method, methods[i])) {
// Don't bother allocating a new string if it's already all uppercase.
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-open-method-case-insensitive-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698