Bug Tracker

Modify

Ticket #6101 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

$.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:
Blocking: Blocked by:

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

comment:1 Changed 3 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 3 years ago by john

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.