This project is archived and is in readonly mode.

#6612 open
Xavier Shay

Nil HTTP user agent breaks route constraints on user_agent

Reported by Xavier Shay | March 24th, 2011 @ 03:20 AM | in 3.0.6

Using the following code in routing (which is recommended on many sites) raises an exception deep inside rack if no user agent is provided by the client:

  constraints :user_agent => /MSIE 6/i do
    get 'admin' => redirect('/unsupported_browser')

Not sure where the correct place to fix this is, but attached is one option in two diffs:
1) Failing test against rails master
2) Fix for rack-mount

Comments and changes to this ticket

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=""></a>