Respect/Rest — Issue #14: Route matching
Author: thiagophx
Created: 2012-01-05 18:31:01+00:00
State: open

Hey mate, how is it going?

I think I may have found a bug.

Check it out.
The method AbstractRoute::match(), does not use the Accept to check whether or not the route is correct.

Example

```php
get('/images', 'MyApp\Controller\ImageJson')->accept(array('application/json' => $jsonHandler));
$router->get('/images', 'MyApp\Controller\ImageHtml')->accept(array('text/html' => $htmlHandler));
```

In this example, if you have an `Accept: text/html,application/json`, it'll always use the first route.