fabpot/Silex — Issue #183: Allow Asserts for HTTP Variables
Author: mgatto
Created: 2011-10-08 19:51:29+00:00
State: open

At the Pittsburgh Perl Workshop's session on the Dancer framework, I saw conditional routes which could be tested against not only route variables as also in Silex, but also on HTTP variables:

```perl
get '/foo', {agent => 'Songbird (\d\.\d)[\d\/]*?'} => sub {
'foo method for songbird'
}

get '/foo' => sub {
'all browsers except songbird'
}
```

Give that the assert regexp is passed to Symfony\Component\Router\Route, could we replicate this in Silex? Should Route.php be altered in Symfony or would that be too much to change?