Side navigation
#5752 closed bug (fixed)
Opened January 05, 2010 02:32AM UTC
Closed January 13, 2010 05:42AM UTC
jquery.ajax DELETE verb does not contain request body content
Reported by: | BenBernanke | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | ajax | Version: | 1.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Failing test case in 1.4a2 located at
http://www.groceryblueprint.com/jquerybug/Jquery14a2DeleteBug.html
Passing test case in 1.3.2 located at
http://www.groceryblueprint.com/jquerybug/Jquery132WorkingProperly.html
The test case is simple:
$(document).ready(function(){
var options = {
url: "/handlers/TestHandler.ashx",
data: { EnteredItem: "ThisShouldAppearInTheRequestBody" },
type: "DELETE"
};
jQuery.ajax(options);
});
The request body is blank and has no Content-Length in 1.4a2. It's populated in 1.3.2. Unless this is intended behavior, I believe this is a bug.
Wireshark network trace under 1.3.2 (note the "EnteredItem" section)
DELETE /handlers/TestHandler.ashx HTTP/1.1
Host: www.groceryblueprint.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Referer: http://www.groceryblueprint.com/jquerybug/Jquery132WorkingProperly.html
Content-Length: 44
EnteredItem=ThisShouldAppearInTheRequestBody
HTTP/1.1 404 Not Found
Wireshark network trace under 1.4a2
DELETE /handlers/TestHandler.ashx HTTP/1.1
Host: www.groceryblueprint.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
X-Requested-With: XMLHttpRequest
Referer: http://www.groceryblueprint.com/jquerybug/Jquery14a2DeleteBug.html
Pragma: no-cache
Cache-Control: no-cache
HTTP/1.1 404 Not Found
Tried it with 1.4 RC1 - still a problem
http://www.groceryblueprint.com/jquerybug/Jquery14rc1DeleteBug.html