Index: Source/core/xml/XMLHttpRequest.cpp |
diff --git a/Source/core/xml/XMLHttpRequest.cpp b/Source/core/xml/XMLHttpRequest.cpp |
index 245bbc5f5dfa27af1b7714dc5abf953eda1661ab..88c950d69f39327d0ab5d620483090a1b043698e 100644 |
--- a/Source/core/xml/XMLHttpRequest.cpp |
+++ b/Source/core/xml/XMLHttpRequest.cpp |
@@ -488,22 +488,20 @@ bool XMLHttpRequest::isAllowedHTTPMethod(const String& method) |
AtomicString XMLHttpRequest::uppercaseKnownHTTPMethod(const AtomicString& method) |
{ |
+ // http://xhr.spec.whatwg.org/#dom-xmlhttprequest-open |
+ // If method is a case-insensitive match for `DELETE`, `GET`, `HEAD`, `OPTIONS`, `POST`, or |
+ // `PUT`, subtract 0x20 from each byte in the range 0x61 (ASCII a) to 0x7A (ASCII z). |
+ // |
+ // If it does not match any of the above, it is passed through literally, including in the final |
+ // request. |
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. |