Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 2, 2012
  1. @pixeltrix

    Reset the request parameters after a constraints check

    pixeltrix committed
    A callable object passed as a constraint for a route may access the request
    parameters as part of its check. This causes the combined parameters hash
    to be cached in the environment hash. If the constraint fails then any subsequent
    access of the request parameters will be against that stale hash.
    To fix this we delete the cache after every call to `matches?`. This may have a
    negative performance impact if the contraint wraps a large number of routes as the
    parameters hash is built by merging GET, POST and path parameters.
    Fixes #2510.
    (cherry picked from commit 5603050)
Commits on Aug 24, 2010
  1. @pixeltrix @josevalim

    Reset symbolized path parameters when a test request is recycled [#5437

    pixeltrix committed with josevalim
    … state:resolved]
    Signed-off-by: José Valim <>
Commits on Aug 22, 2010
  1. @pixeltrix @josevalim

    Cache the symbolized path parameters using a instance variable in the…

    pixeltrix committed with josevalim
    … request object rather than the environment hash. This it to prevent stale parameters in later routing constraints/redirects as only the normal path parameters are set by Rack::Mount.
    Also if a constraint proc arity is more than one, pass the symbolized path parameters
    as the first argument to match redirect proc args and provide easier access.
    [#5157 state:resolved]
    Signed-off-by: José Valim <>
Something went wrong with that request. Please try again.