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

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: 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
Index: Source/core/xml/XMLHttpRequest.cpp
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp
index 2be93cbccf83ca1536f9953ba08b4241371fd95a..014275a1acb49a39f6ab848fa076b35083d3ed9d 100644
--- a/Source/core/xml/XMLHttpRequest.cpp
+++ b/Source/core/xml/XMLHttpRequest.cpp
@@ -499,22 +499,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.

Powered by Google App Engine
This is Rietveld 408576698