Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8980 closed defect (fixed)

dojox.rpc.Rest incorrectly adds trailing slash to target

Reported by: Jarrod Carlson Owned by: Kris Zyp
Priority: high Milestone: 1.4
Component: Dojox Version: 1.3.0b3
Keywords: Cc:
Blocked By: Blocking:


I have a REST-based web service where resources are available.

Assume my services return Foo objects. Thusly,

returns a list of Foo objects, and

returns the Foo object with an id of '123'.

When I create a JsonRestStore? with a target of "/foos", the dojox.rpc.Rest implementation assumes itself to append a "/" to the target:

62    path = path.match(/\/$/) ? path : (path + '/');

However, my REST server does not support the url "". It should be "".

dojox.rpc.Rest should not presume itself to add slashes to the target.

Change History (4)

comment:1 Changed 13 years ago by Adam Peller

Milestone: 1.3tbd
Owner: changed from Adam Peller to Kris Zyp

comment:2 Changed 13 years ago by Chris Mitchell

We're also seeing a need for flexibility on the trailing slash to allow connecting to projectzero's REST services.

comment:3 Changed 13 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

This should be fixed. By default trailing slashes are still added for backwards compatibility, but you can disable that by allowNoTrailingSlash to true: new{allowNoTrailingSlash: true, target:"/MyData"});

comment:4 Changed 13 years ago by Adam Peller

Milestone: tbd1.4
Note: See TracTickets for help on using tickets.