You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just found out that the Fastify router does not enable by default ignoreTrailingSlashes. We can enable them as described here: https://morioh.com/p/bcdbef588277. However, now I wonder which is the correct behavior. Is it standard to ignore the trailing slashes? Is it something that we should tackle in the WoT Discovery spec?
I guess technically there should be a 301 redirect from one to the other. And since /things is what's in the specification, it should probably redrect /things/ to /things. Whether or not WoT Consumers will follow the redirect is another matter, though that's another good reason not to disallow redirect responses!
We sidestep this kind of issue in the protocol bindings in WoT Profile by not specifying hard coded paths, which is what I personally think WoT Discovery should have done. But given it does specifiy paths, it might have to deal with issues like this more explicitly.
Just a small thing, and it's probably spec compliant, but this caught me out when I wasn't sure why I kept getting 404 responses.
A GET request on
/things
works, but a request on/things/
returns a 404.The text was updated successfully, but these errors were encountered: