Opened 15 years ago
Closed 15 years ago
#1087 closed defect (invalid)
dojo.io - Transport not defaulted to djConfig ioSendTransport param or kwArgs sendTransport param
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Core | Version: | 0.3 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
When creating a dojo.io.Request from keyword arguments, the sendTransport is used to determine the prefered transport mechanism. The argument in evaluated by the following line of code found in the fromKwArgs function :
kwArgs.sendTransport = dojo.lang.firstValued(kwArgssendTransport?, djConfigioSendTransport?, false);
Once the request is created the dojo.io.bind function evaluated the request's transport attribute to determine if a transport has been set. When not set, an attempt is made auto-detect the best transport.
if(requesttransport?){.........}
else{ otherwise we do our best to auto-detect what available transports will handle ..... }
Thus it is imposible to set the transport via keyword arguments or via the djConfig.
A simple fix would be just to change kwArgs.sendTransport to kwArgs.transport, i.e
kwArgs.transport = dojo.lang.firstValued(kwArgssendTransport?, djConfigioSendTransport?, false);
cheers, ravan
Change History (1)
comment:1 Changed 15 years ago by
Cc: | [email protected]… added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Those are two separate fields that do two different things:
sendTransport will send the transport that was used as part of the request parameters so the server can know if a transport was used and what type. It is a boolean value, true means the request parameter will be sent, false (the default) means that it won't.
transport is a way that you can override the auto-detection logic of which transport dojo.io.bind() will use. To override the transport, specify a string with the transport name.
Closing this bug for now (working as designed), but feel free to reopen with more info.