Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Nil HTTP user agent breaks route constraints on user_agent

#6612

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')
  end

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

Reported by Xavier Shay · March 24th, 2011 @ 03:20 AM

State: open
Milestone: 3.0.6
Assigned to: Andrew White Andrew White
Importance: Low

Activity

  1. Xavier Shay
    Xavier Shay
    • Tag changed from rack routing to rack, routing

    Attaching rack-mount fix.

    March 24th, 2011 @ 03:20 AM

  2. Andrew White
    Andrew White
    • State changed from new to open
    • Milestone set to 3.0.6
    • Assigned user set to Andrew White
    • Importance changed from to Low

    March 24th, 2011 @ 01:23 PM