Rocket/lib/src/router
Sergio Benitez cc22836867 Precisely route formats. Make 'content_type' an 'Option' in 'Request'.
This commit changes the routing algorithm. In particular, it enforces
precise matching of formats. With this change, a route with a specified
format only matches requests that have the same format specified. A
route with no format specified matches any request's format. This is
contrast to the previous behavior, where a route without a specified
format would match requests regardless of their format or whether one
was specified.

This commit also changes the following:
  * The return type of the 'content_type' method of 'Request' is now
    'Option<ContentType>'.
  * The 'ContentType' request guard forwards when the request has no
    specified ContentType.
  * The 'add_header' and 'replace_header' methods take the header
    argument generically.

Closes #120.
2017-02-01 03:12:24 -08:00
..
collider.rs Precisely route formats. Make 'content_type' an 'Option' in 'Request'. 2017-02-01 03:12:24 -08:00
mod.rs Precisely route formats. Make 'content_type' an 'Option' in 'Request'. 2017-02-01 03:12:24 -08:00
route.rs Precisely route formats. Make 'content_type' an 'Option' in 'Request'. 2017-02-01 03:12:24 -08:00