From: Dave Methvin Date: Fri, 24 Aug 2012 15:59:01 +0000 (-0400) Subject: Revert "Fix #11586. Ajax DELETE ain't got no body, so data goes to its URL." X-Git-Tag: 1.8.1~24 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05337e78fa68aac3a3d703d7cc59f145f13ea779;p=jquery.git Revert "Fix #11586. Ajax DELETE ain't got no body, so data goes to its URL." This reverts commit c01e022f33575ed45fb8da65be756fc464d40a24. We actually changed DELETE to accept a body on purpose, see http://bugs.jquery.com/ticket/7285 . --- diff --git a/src/ajax.js b/src/ajax.js index 04b8a2536..cfbfcd527 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -7,7 +7,7 @@ var // Document location rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD|DELETE)$/, + rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, rscript = /)<[^<]*)*<\/script>/gi, diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 2483a4bbd..1345eae3a 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -840,21 +840,6 @@ test("jQuery.ajax - HEAD requests", function() { }); - -test("jQuery.ajax - DELETE requests", function() { - expect(1); - - jQuery.ajax({ - url: "devo.html", - type: "DELETE", - data: { "whip": "it", "qty": "good" }, - beforeSend: function( _ , s ) { - equal( s.url, "devo.html?whip=it&qty=good", "Delete requests encode data in URL" ); - return false; - } - }); -}); - test("jQuery.ajax - beforeSend", function() { expect(1); stop();