Skip to content

Commit 05337e7

Browse files
committed
Revert "Fix #11586. Ajax DELETE ain't got no body, so data goes to its URL."
This reverts commit c01e022. We actually changed DELETE to accept a body on purpose, see http://bugs.jquery.com/ticket/7285 .
1 parent a5be986 commit 05337e7

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

src/ajax.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var // Document location
77
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
88
// #7653, #8125, #8152: local protocol detection
99
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
10-
rnoContent = /^(?:GET|HEAD|DELETE)$/,
10+
rnoContent = /^(?:GET|HEAD)$/,
1111
rprotocol = /^\/\//,
1212
rquery = /\?/,
1313
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,

test/unit/ajax.js

-15
Original file line numberDiff line numberDiff line change
@@ -840,21 +840,6 @@ test("jQuery.ajax - HEAD requests", function() {
840840

841841
});
842842

843-
844-
test("jQuery.ajax - DELETE requests", function() {
845-
expect(1);
846-
847-
jQuery.ajax({
848-
url: "devo.html",
849-
type: "DELETE",
850-
data: { "whip": "it", "qty": "good" },
851-
beforeSend: function( _ , s ) {
852-
equal( s.url, "devo.html?whip=it&qty=good", "Delete requests encode data in URL" );
853-
return false;
854-
}
855-
});
856-
});
857-
858843
test("jQuery.ajax - beforeSend", function() {
859844
expect(1);
860845
stop();

0 commit comments

Comments
 (0)