Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7268 closed bug

Data argument no longer works with DELETE requests

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: data argument delete Cc:
Blocked by: Blocking:

Description

Introduced here: http://github.com/jquery/jquery/commit/c4e653237f258ce618ad5a9ec677917166fbed16

Code presupposes that data will never be sent with GET, HEAD or DELETE requests, previous versions only assumed this to be the case with GET.

Change History (5)

comment:1 Changed 9 years ago by addyosmani

Keywords: data argument delete added
Owner: set to anonymous
Priority: undecidedlow
Status: newpending

Please provide us with a test case that reproduces this issue so that we can verify the effects its having.

comment:2 Changed 9 years ago by Mal

I did try to, however jsfiddle does not support ajax testing with anything but POST requests. I have posted a test case on jsFiddle, but it must be executed elsewhere in a PHP environment, sorry I couldn't be of more help.

Hope this is what you were looking for.

http://jsfiddle.net/malibu/MCzkL/

comment:3 Changed 9 years ago by Mal

Managed to get the test case up on a server: http://www.locatetv.com/blog/test/test.php

As you can see while the PUT request echos back correctly, the DELETE data is never sent and the corresponding echo is blank.

comment:4 Changed 9 years ago by andrew@…

I can confirm this regression. The fix is simply to remove DELETE from the rnoContent regexp, since there's no reason that delete requests cannot have parameters.

comment:5 Changed 9 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.