mirror of https://github.com/rwf2/Rocket.git
9160483554
This is a breaking change. It modifies collisions with respect to query parameters as well as the default ranking of routes. A route that does not specify query parameters will now match against requests with _and without_ query parameters, assuming all other elements of the route match as well. A route that _does_ specify query parameters will only match requests with query parameters; this remains true. To accommodate this change in the most natural manner possible, the default rankings of routes have changed as illustrated below: |-------------+-------+----------+---------------| | static path | query | new rank | previous rank | |-------------+-------+----------+---------------| | yes | yes | -4 | 0 | | yes | no | -3 | 0 | | no | yes | -2 | 1 | | no | no | -1 | 1 | |-------------+-------+----------+---------------| In other words, the most specific routes, with preference for paths over queries, are ranked highest (lower number). |
||
---|---|---|
.. | ||
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 | ||
msgpack | ||
optional_redirect | ||
optional_result | ||
pastebin | ||
query_params | ||
raw_sqlite | ||
raw_upload | ||
redirect | ||
session | ||
state | ||
static_files | ||
stream | ||
testing | ||
todo | ||
uuid |