mirror of https://github.com/rwf2/Rocket.git
cc22836867
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. |
||
---|---|---|
.. | ||
config | ||
content_types | ||
cookies | ||
errors | ||
extended_validation | ||
form_kitchen_sink | ||
forms | ||
from_request | ||
handlebars_templates | ||
hello_alt_methods | ||
hello_person | ||
hello_ranks | ||
hello_world | ||
json | ||
manual_routes | ||
optional_redirect | ||
optional_result | ||
pastebin | ||
query_params | ||
raw_upload | ||
redirect | ||
state | ||
static_files | ||
stream | ||
testing | ||
todo | ||
uuid |