Re:Heroku Fucking Console
by slewis on Friday March 01, 2013 @12:42PM
(#5305687)
http://example.com/page and http://example.com/page/ could be totally different pages... So .replace()'ing could silently cause unexpected breakage.
[ Parent
| on HN ]
They shouldn't be. Slash normalization is pretty normal and it's ones of the first things frameworks add.
It doesn't matter if some people do slash normalizing. It's not how the web works at the standards-level.
Re:Heroku Fucking Console
by artursapek on Friday March 01, 2013 @07:35PM
(#5307856)
Well, maybe everyone's unawareness of this means the standard is wrong.
Re:Heroku Fucking Console
by itsnotlupus on Friday March 01, 2013 @10:12PM
(#5308291)
A de facto standard? We'll have to ask the committee about that.
Re:Heroku Fucking Console
by silentOpen on Friday March 01, 2013 @09:56PM
(#5308255)
No.
However, they're probably building to the URL spec which is what they should be doing.
They are not allowing the trailing / anyway, so what's the difference?
If you type google.com you don't expect FB to replace it to bing.com without telling you.
/path and /path/ are two totally different things in the standards, just like /path and /path2. Sure in most cases with and without trailing slash gives the same page; but it's not something you can assume.
Same reason why "we don't allow https links" doesn't mean you can just drop the s.