{"action":"created","issue":{"url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/434","repository_url":"https://api.github.com/repos/SergioBenitez/Rocket","labels_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/434/labels{/name}","comments_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/434/comments","events_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/434/events","html_url":"https://github.com/SergioBenitez/Rocket/pull/434","id":258320334,"node_id":"MDExOlB1bGxSZXF1ZXN0MTQxNDk1NTgz","number":434,"title":"Make query string parsing non-strict by default","user":{"login":"carlosdp","id":198739,"node_id":"MDQ6VXNlcjE5ODczOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/198739?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosdp","html_url":"https://github.com/carlosdp","followers_url":"https://api.github.com/users/carlosdp/followers","following_url":"https://api.github.com/users/carlosdp/following{/other_user}","gists_url":"https://api.github.com/users/carlosdp/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosdp/subscriptions","organizations_url":"https://api.github.com/users/carlosdp/orgs","repos_url":"https://api.github.com/users/carlosdp/repos","events_url":"https://api.github.com/users/carlosdp/events{/privacy}","received_events_url":"https://api.github.com/users/carlosdp/received_events","type":"User","site_admin":false},"labels":[{"id":763870241,"node_id":"MDU6TGFiZWw3NjM4NzAyNDE=","url":"https://api.github.com/repos/SergioBenitez/Rocket/labels/closed","name":"closed","color":"cb2431","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-17T17:53:09Z","updated_at":"2018-07-02T19:48:48Z","closed_at":"2018-06-29T02:48:54Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/SergioBenitez/Rocket/pulls/434","html_url":"https://github.com/SergioBenitez/Rocket/pull/434","diff_url":"https://github.com/SergioBenitez/Rocket/pull/434.diff","patch_url":"https://github.com/SergioBenitez/Rocket/pull/434.patch"},"body":"I'd like to suggest this change which makes query string parsing non-strict by default. Query strings often contain garbage data and having erroneous parameters we don't care about in it should not factor in on whether the route matches or not.\r\n\r\nFor example, if you are implementing a GET webhook, the webhook developer might add a new parameter to the payload, which they can do without notice since it isn't a breaking change to the API, and this would break our application because the route would no longer match, even though we can still parse the data just fine.\r\n\r\nOr, a Facebook share button might attach a `share=facebook_newsfeed` parameter to the URL to indicate where the user came from. In the current default behavior, they would get a 404 if the route took query parameters.\r\n\r\nFinally, no other web framework to my knowledge rejects a request for having a super set of the expected query parameters. This behavior is very confusing for developers coming over from Rails or Node, etc. If someone has a good use case for making query parameters strict on the route, we should provide the option to do so, but the default should be non-strict to match more in-line with what web developers expect."},"comment":{"url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/comments/401913909","html_url":"https://github.com/SergioBenitez/Rocket/pull/434#issuecomment-401913909","issue_url":"https://api.github.com/repos/SergioBenitez/Rocket/issues/434","id":401913909,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTkxMzkwOQ==","user":{"login":"SergioBenitez","id":1480321,"node_id":"MDQ6VXNlcjE0ODAzMjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1480321?v=4","gravatar_id":"","url":"https://api.github.com/users/SergioBenitez","html_url":"https://github.com/SergioBenitez","followers_url":"https://api.github.com/users/SergioBenitez/followers","following_url":"https://api.github.com/users/SergioBenitez/following{/other_user}","gists_url":"https://api.github.com/users/SergioBenitez/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioBenitez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioBenitez/subscriptions","organizations_url":"https://api.github.com/users/SergioBenitez/orgs","repos_url":"https://api.github.com/users/SergioBenitez/repos","events_url":"https://api.github.com/users/SergioBenitez/events{/privacy}","received_events_url":"https://api.github.com/users/SergioBenitez/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T19:48:48Z","updated_at":"2018-07-02T19:48:48Z","author_association":"OWNER","body":"@carlosdp No, not yet, but we want a holistic solution that envelops this PR instead of a one-off solution."}}
{"actor":{"display_login":"SergioBenitez"}}