Opened 7 years ago

Closed 7 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 7 years ago by bill

Component: GeneralIO
Owner: set to Bryan Forbes

comment:2 Changed 7 years ago by Bryan Forbes

Milestone: tbd1.8.2
Resolution: duplicate
Status: newclosed

This is a duplicate of #16240 which will be fixed in 1.8.2 (and is fixed on the 1.8 branch).

Note: See TracTickets for help on using tickets.