1
Nmeri17
205d

It's shockingly bad, Jesus 😣

https://stackoverflow.com/questions...

I know I'm just whining atp instead of moving on something else. For lack of anything else, I blame capitalism for limiting my options. I would never subject myself to this torture of my own volition. Yet, you have to wonder how a joke like this. Even a routing library developed over a code kata or aboard a flight would at least, include a regex capturing possibility of trailing slashes. How would one ever imagine that all clients of this api have to strictly either end their url with slashes, otherwise they get slammed with a 404

Unbelievable

Comments
  • 1
    @retoor I will be surprised if trailing slashes are a spec-level concern. In all my years of internet usage, this is my first time to ever come across a strict demand for adherence to TRAILING SLASHES. The more I contemplate this disease, the weaker I get. This is analogous to the punctuation of a sentence. It is not the path and should be treated separately rather than determining url is nonexistent. As a server, You are not supposed to rely on its presence unless it's followed by other characters. This isn't xml or yml. It's literally TWO extra regex characters to your route parser

    Shameful
  • 0
    @retoor is correct. Spring and Tomcat are anal about their trailing slashes. It's not just those two, in the NodeJS ecosystem you see it too and even more -- the leading slashes (at mapping) make requests' mapping at entirely different paths.
  • 0
    @retoor If you use path '/home', then you're referring to the '/home' resource. However, a '/home/' refers to the _root_ ['/'] resource under /home, and not /home itself.

    It makes much semantic sense
  • 1
    @netikras fair enough. But Such a slight divergence is very easy to miss
Add Comment