This project is archived and is in readonly mode.
Routes are case sensitive
-
Pete P.
Fyi,
RFC 1738 - Uniform Resource Locators (URL) - Section 2.1
..."For resiliency, programs interpreting URLs should treat upper case letters as equivalent to lower case in scheme names (e.g., allow "HTTP" as well as "http")."
http://www.faqs.org/rfcs/rfc1738... section 2.1
-
Pete P.
Ok, so in the above RFC spec its really just referring to the scheme portion of the url, not the path.
But in any case, consider the usability of having case sensitive routes
-
Jeff Dean
Not only that, but in 37Signals' own book Defensive Web Design they talk about how important case-insensitive urls are.
I agree that the path portion of urls should be case-insensitive.
-
Pratik
- State changed from new to wontfix
- Tag set to routes
URI should be case sensitive by default. It might be nice to give option to make them insenitive though.
Thanks.
-
Carsten Gehling
I know this is an old post, but I've just has the same problem, and solved it using middelware - have a look here:
http://gehling.dk/2010/02/how-to-make-rails-routing-case-insensitive/
-
Jeff Dean
Pratik - any chance you could elaborate on why routes should be case-sensitive?
Are you aware of any apps in production that rely on case-sensitive routes? Is there a compelling performance reason to not call downcase on the incoming path when matching?