Side navigation
#15216 closed bug (migrated)
Opened August 21, 2014 08:46AM UTC
Closed October 21, 2014 01:00AM UTC
$.getJSON treats request as JSONP when URL contains ?? (two question marks)
Reported by: | Stijn | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | ajax | Version: | 2.1.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Similar to http://bugs.jquery.com/ticket/8417 and its duplicates, but they're all about the data parameter, not the URL parameter.
Happens with current stable and with edge. Fiddle: http://jsfiddle.net/r5zcw6wx/
Code:
$.getJSON("http://date.jsontest.com/") $.getJSON("http://date.jsontest.com/?foo") $.getJSON("http://date.jsontest.com/??foo")
Requests:
GET http://date.jsontest.com/ GET http://date.jsontest.com/?foo GET http://date.jsontest.com/jQuery2129957077760988448071399739372034175163514043816_1408610547781foo?_=1408610547782
Of course we shouldn't be making requests with two question marks (naive string concat on our side), and this could be a dupe of the mentioned ticket, but I figured this was worth reporting anyway.
Attachments (0)
Change History (1)
Changed October 21, 2014 01:00AM UTC by comment:1
resolution: | → migrated |
---|---|
status: | new → closed |
Migrated to https://github.com/jquery/jquery/issues/1791