Opened 10 years ago
Closed 10 years ago
#16277 closed defect (duplicate)
dojo.io.script.get adding multiple callback parameters when using jsonp
Reported by: | allen.xiao | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.2 |
Component: | IO | Version: | 1.8.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dojo.io.script.get({
url: /myurl, callbackParamName: "callback", load: dojo.hitch(this, this._getSuccess), error: dojo.hitch(this, this._getError), handleAs: 'json'
});
The url sent over the network is then: /myurl?callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback&callback=dojo_request_script_callbacks.dojo_request_script0
notice the callback parameter is added twice with different values. I would expect only one value for the callback to be sent.
I tracked it up to request/script.js: var queryParameter = (~url.indexOf('?') ? '&' : '?') + options.jsonp + '='; if(url.indexOf(queryParameter) === -1)
the queryParameter check fails b/c the url already has /myurl?callback=... in it
Change History (2)
comment:1 Changed 10 years ago by
Component: | General → IO |
---|---|
Owner: | set to Bryan Forbes |
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.8.2 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
This is a duplicate of #16240 which will be fixed in 1.8.2 (and is fixed on the 1.8 branch).