[openstack-dev] [nova] Trailing Slashes on URLs

Sean Dague sean at dague.net
Tue Mar 22 17:37:13 UTC 2016

On 03/22/2016 12:34 PM, Shoham Peller wrote:
> Hi,
> Nova-api behaves different whether a trailing-slash is given in the URL
> or not.
> These 2 requests produce different results:
>   * GET /v2/{tenant-id}/servers - gets a list of servers
>   * GET /v2/{tenant-id}/servers/ - gets an info for a server with an
>     "empty id" - produces 404
> IMHO, a trailing slash in REST requests should be ignored.
> A few resources about REST and trailing slashes:
> http://programmers.stackexchange.com/questions/186959/trailing-slash-in-restful-api
> https://github.com/nicolaiarocci/eve/issues/118
> What do you think of this issue?
> Is this difference in behavior is on purpose?

This is the way python routes works, it's pretty embedded behavior in
libraries we don't control.

While one could argue they should be equivalent, the docs are pretty
straight forward about what the correct links are, and we only generate
working links in our references.

There are many issues that we should address in the API, this one
probably doesn't crack the top 100.


Sean Dague

More information about the OpenStack-dev mailing list