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

Already on GitHub? Sign in to your account

JSONP detection too aggressive? #903

Closed
baluubas opened this Issue Jan 22, 2014 · 3 comments

Comments

Projects
None yet
2 participants

In the ajax module there is a test that determine if a request is a JSONP and if so uses JSONP to do the request.

var dataType = settings.dataType, hasPlaceholder = /=\?/.test(settings.url)
if (dataType == 'jsonp' || hasPlaceholder) {
   <return ajaxJSONP>
}

Problem is my url contains the pattern but should be a regular ajax request with xml datatype. At least for me this broke compability with jQuery which we were using before.

Collaborator

mislav commented Jan 22, 2014

Thanks for reporting. How did your URL come up to have the literal characters =? in it?

The path contains a base64 encoded value, combined with cache: false this generates a url that is similar to this:

http://host/gUFVFyEJglwzlO0avQfl2Zuez9E=?_=1390391071766
Collaborator

mislav commented Jan 22, 2014

Got it, thanks. Now I can see how this happened. I'll try to patch this soon

@mislav mislav closed this in 9b03ff0 Jan 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment