This project is archived and is in readonly mode.

#75 ✓wontfix
Tayfun

Routing - Receptors with a dot in the name

Reported by Tayfun | May 1st, 2008 @ 01:59 PM

Hi,

I'm not sure if this is bug or a feature, but it took me some time to understand so that's why I'm asking about it. Here's my configuration:

I have a fairly typical UploadsController and in my routes.rb file I added a named route with the line:

map.request_upload '/indir/:random_id/:filename', :controller => 'uploads', :action => 'request_file'

But when I visit a URL such that the :filename receptor has a dot in the name, I get a routing error. An example URL is http://localhost:3000/indir/7245... which spits a routing error. When the URL is something like http://localhost:3000/indir/7245... then the route is recognized. I am using Rails revision 9248 from the SVN repository.

Comments and changes to this ticket

  • Carl Porth

    Carl Porth May 28th, 2008 @ 03:29 AM

    Try passing a Regexp in your route definition like this:

    map.request_upload '/indir/:random_id/:filename', :controller => 'uploads', :action => 'request_file', :filename => /.*/
    
  • josh

    josh July 17th, 2008 @ 01:59 AM

    • State changed from “new” to “wontfix”
    • Tag set to routing

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Tags

Referenced by

Pages