L.
On 2011-04-28, at 10:21 PM, Victor Song wrote:
> Are URLs case sensitive in Express? HTML4 spec says so (except machine names), I did not find anything in HTML5 spec.
>
> --
> You received this message because you are subscribed to the Google Groups "Express" group.
> To post to this group, send email to expre...@googlegroups.com.
> To unsubscribe from this group, send email to express-js+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/express-js?hl=en.
--
Laurie Harper
http://laurie.holoweb.net/
Thanks for the clarification. I first noticed this in a W3C doc at http://www.w3.org/TR/WD-html40-970708/htmlweb.htmlIt seems section 3.2.3 of RFC 2616 says the "path/to/something" part should be case sensitive: http://www.ietf.org/rfc/rfc2616.txt
--
On Thursday, April 28, 2011 at 7:21 PM, Victor Song wrote:
Are URLs case sensitive in Express? HTML4 spec says so (except machine names), I did not find anything in HTML5 spec.
--
> the regexps generated by Express set the "i" flag so they are case-insensitive. mainly a personal preference, but it could be something that we could allow toggling with an option, though I imagine most people will maintain lowercased pathnames and prefer the way it is now
Gentlefolk,
While an IETF "SHOULD" recommendation can be ignored, what is the reason to ignore it? Why is it a virtue that Express overrules a "SHOULD" recommendation? Why should developers even have to be aware of this issue?
Being liberal in what you accept does not mean you should change the interpretation of URLs. This way does lead to subtle bugs.
Anon,
Andrew
____________________________________
Andrew W. Donoho
Donoho Design Group, L.L.C.
a...@DDG.com, +1 (512) 750-7596, twitter.com/adonoho
"We did not come to fear the future.
We came here to shape it."
-- President Barack Obama, Sept. 2009
Thanks for the clarification. I first noticed this in a W3C doc at http://www.w3.org/TR/WD-html40-970708/htmlweb.htmlIt seems section 3.2.3 of RFC 2616 says the "path/to/something" part should be case sensitive: http://www.ietf.org/rfc/rfc2616.txt
While an IETF "SHOULD" recommendation can be ignored, what is the reason to ignore it? Why is it a virtue that Express overrules a "SHOULD" recommendation? Why should developers even have to be aware of this issue?
Being liberal in what you accept does not mean you should change the interpretation of URLs. This way does lead to subtle bugs.
The point being, it is the job of the web server / web application to determine what resource corresponds to a particular URL. Mapping URLs which vary only by case to the *same* URL is perfectly within the language and intent of the relevant specs.
On Apr 29, 2011, at 14:38 , Laurie Harper wrote:The point being, it is the job of the web server / web application to determine what resource corresponds to a particular URL. Mapping URLs which vary only by case to the *same* URL is perfectly within the language and intent of the relevant specs.Laurie,You did not actually answer my question. You stated what you could do and still remain in conformance with the spec.I asked: "Why is it a virtue that Express overrules a "SHOULD" recommendation?"
use regular expressions instead of strings to specify your paths; Express will use them as-is, and you have full control