We have an application where one part of many routes is a user name. This user name may contain one or more periods, like so: http://domain.name/typical.user/messages This of course works nicely in Rails 1.1. But in Edge Rails, the period is a routing character signifying the choosing of data representations. Is there a way of turning off this behaviour? We do not want to have to URL-encode our usernames. / Peter Bengtson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 16 okt 2006, at 17.11, Peter Bengtson wrote:> > We have an application where one part of many routes is a user name. > This user name may contain one or more periods, like so: > > http://domain.name/typical.user/messages > > This of course works nicely in Rails 1.1. But in Edge Rails, the > period is a routing character signifying the choosing of data > representations. > > Is there a way of turning off this behaviour? We do not want to have > to URL-encode our usernames.The more I look into this, the more it looks like a Rails bug. In a route such as the following: map.connect ''/foo/:login/bar/baz'', :controller => ''whatever'' why should matching fail at all when the value for :login contains a period? Only if the route was written: map.connect ''/foo/:login.:format/bar/baz, ... would it be any point in parsing for a period as a separator. Moreover, is there really any point in interpreting a period in input data unless the data comes _last_ in the URL? / Peter Bengtson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Doesn''t anybody have any clue about this??? On 16 okt 2006, at 20.14, Peter Bengtson wrote:> > On 16 okt 2006, at 17.11, Peter Bengtson wrote: > >> >> We have an application where one part of many routes is a user name. >> This user name may contain one or more periods, like so: >> >> http://domain.name/typical.user/messages >> >> This of course works nicely in Rails 1.1. But in Edge Rails, the >> period is a routing character signifying the choosing of data >> representations. >> >> Is there a way of turning off this behaviour? We do not want to have >> to URL-encode our usernames. > > > The more I look into this, the more it looks like a Rails bug. In a > route such as the following: > > map.connect ''/foo/:login/bar/baz'', :controller => ''whatever'' > > why should matching fail at all when the value for :login contains a > period? Only if the route was written: > > map.connect ''/foo/:login.:format/bar/baz, ... > > would it be any point in parsing for a period as a separator. > Moreover, is there really any point in interpreting a period in input > data unless the data comes _last_ in the URL? > > / Peter Bengtson > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---