1
Vote

Server does not correctly handle link URLs with subpaths

description

When parsing link URLs in ParseSingleEntityLink(), ODataServer attempts to match up the link route to it's own route template. This works if the link route looks like this:

http://www.foo.com/odata/SomeEntity(1L)

but it fails when there is as subpath in the route:

http://www.foo.com/bar/odata/SomeEntity(1L)


This is because the route template only contains "odata/{*odataPath}", which doesn't allow for any subpaths in the link route.

comments

johncrim wrote Jan 15, 2015 at 8:36 PM

This is for PUT or $batch requests - presumably it works ok for requests outside $batch, though that would be worth testing, too.

Good catch! With a little work this is unit testable...