Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$.getJSON treats request as JSONP when URL contains ?? (two question marks) #1791

Closed
mgol opened this issue Oct 21, 2014 · 4 comments

Comments

@mgol
Copy link
Member

commented Oct 21, 2014

Originally reported by Stijn at: http://bugs.jquery.com/ticket/15216

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.

Issue reported for jQuery 2.1.1

@mgol

This comment has been minimized.

Copy link
Member Author

commented Sep 16, 2015

Moving to 3.0.1

@mgol mgol modified the milestones: 3.0.1, 3.0.0 Sep 16, 2015
@markelog

This comment has been minimized.

Copy link
Member

commented Oct 8, 2015

@dmethvin, @jaubourg and me for close it as notabug, so if no one objects, will do that tomorrow

@mgol

This comment has been minimized.

Copy link
Member Author

commented Oct 9, 2015

@markelog No objection from me.

@markelog markelog removed this from the 3.0.1 milestone Oct 9, 2015
@markelog

This comment has been minimized.

Copy link
Member

commented Oct 9, 2015

Closing as non-valid

@markelog markelog closed this Oct 9, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.