Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6101 closed bug (invalid)

$.ajax() ignores "data" content for JSONP-GET requests

Reported by: tutils Owned by:
Priority: Milestone: 1.4.2
Component: ajax Version: 1.4.1
Keywords: ajax jsonp Cc:
Blocked by: Blocking:

Description

$.ajax() doesn't place the variables in the "data" parameter into the URL, even though the documentation says about the "data" parameter: "It's appended to the url for GET-requests".

Test case: http://jsbin.com/oqubu/edit

Change History (2)

comment:1 Changed 10 years ago by tutils

It seems I jumped the gun. After inspecting the test case with Firebug, I see that the "data" variables do get added to the URL, however they are added *after* the callback function, which breaks the test case (in this case, Google).

Without "data" (works): http://maps.google.com/maps/geo?sensor=false&q=USA&callback=jsonp1266305317582

With "data" (breaks): http://maps.google.com/maps/geo?callback=jsonp1266305317583&q=USA&sensor=false

How do you suggest to proceed?

comment:2 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

Perhaps Google should be contacted to let them know that their URL parameter parsing is broken?

I'm always surprised at how many broken JSONP implementations there are.

Note: See TracTickets for help on using tickets.