Routes are case sensitive
Reported by Pete P. | June 11th, 2008 @ 07:20 PM
All routes are by default case sensitive, so map.connect 'about', :controller=>"about", :action=>"index" is not recognized by a request to /About.
I'm not too sure what the default behavior should be, but case sensitivity should at least be an option when specifying routes in routing.rb
In the meantime, as a work around, I'm going to patch up ActionController::Routing#recognition_conditions to return a case insensitive Regexp
Comments and changes to this ticket
-

Pete P. June 13th, 2008 @ 08:09 PM
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. June 13th, 2008 @ 08:29 PM
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 June 19th, 2008 @ 03:44 AM
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 July 23rd, 2008 @ 02:08 PM
- → Tag changed from to routes
- → State changed from new to wontfix
URI should be case sensitive by default. It might be nice to give option to make them insenitive though.
Thanks.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Source available from github
The Git repository resides at http://github.com/rails
Check out the current development trunk (Edge Rails) with:
git clone git://github.com/rails/rails.git
Creating or reviewing a patch
See the contributor guide.
Creating a feature request
Please don't. If you want a new feature in Rails, you'll have to pull up your sleeves and get busy yourself. Or convince someone else to do it. See the contributor guide on how to get going. But posting them here is just going to lead to ticket root.
Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post the code sample that causes the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.
Security vulnerabilities should be reported via an email to security@rubyonrails.org, do not use trac for reporting security vulnerabilities. All content in trac is publicly available as soon as it is posted.
Then don't get your hopes up. Unless you have a "Code Red, Mission Critical, The World is Coming to an End" kinda bug, you're creating this ticket in the hope that others with the same problem will be able to collaborate with you on solving it. Do not expect that the ticket automatically will see any activity or that others will jump to fix it. Creating a ticket like this is mostly to help yourself start on the path of fixing the problem and for others to sign on to with a "I'm having this problem too".
