lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]





On Wed, Jun 4, 2014 at 11:34 PM, Sean Conner <sean@conman.org> wrote:
It was thus said that the Great Andrew Starks once stated:
>
> I can't see where, or even how, busted is/could be broken. I see the
> inconsistent behavior when running the following code block, within a
> busted test:
>
> local a = url("mcp://host/thread/name")
> local b = url("mcp://host/thread/name/")
> assert.True(a == b)

  Technically speaking, the two URLs are not identical as the trailing slash
modifies the meaning of "name" in the URL.  RFC-3986 states that if the
former redirects to the latter, only then are the equivalent, otherwise, the
first refers to a resource (file) and the second to a directory (section
6.2.4).

  -spc





Thank you for this. I may want to pick a different name than "URL" or  adopt the official meaning, as you suggest. I'll have to read the specification, but I guess that means that I should technically error (probably 404?) if a slash is included and the target is a resource that is not a collection...

-Andrew