Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement HTTP 405 #1499

Closed
wants to merge 4 commits into from
Closed

Implement HTTP 405 #1499

wants to merge 4 commits into from

Conversation

peng1999
Copy link

@peng1999 peng1999 commented Dec 30, 2020

This is basically a squash merge of #1335. Original changes are preserved as possible, and I added some minor fixes and improvements.

This should fix #1224.

commit 565151b
Merge: 020af51 549c924
Author: Lorran Rosa <[email protected]>
Date:   Fri Aug 7 07:31:20 2020 -0300

    Merge branch 'master' of https://github.com/SergioBenitez/Rocket

commit 020af51
Author: Lorran Rosa <[email protected]>
Date:   Fri Aug 7 07:13:11 2020 -0300

    Removed extra comments

commit a6ad90f
Author: Lorran Rosa <[email protected]>
Date:   Fri Jul 3 10:17:55 2020 -0300

    Added description to `restrict` param at Router.route

commit f288f8d
Author: Lorran Rosa <[email protected]>
Date:   Fri Jul 3 10:17:03 2020 -0300

    Fix formatting in Rocket.route

commit 197f8ee
Author: Lorran Rosa <[email protected]>
Date:   Fri Jul 3 09:36:33 2020 -0300

    Simplified the logic at Rocket.route

commit 13b6386
Author: Lorran Rosa <[email protected]>
Date:   Tue Jun 23 18:06:47 2020 -0300

    [WIP] Passing the logic to the router and performance corrections

commit 4c3e516
Merge: d3ba36e 63a4ae0
Author: Lorran Rosa <[email protected]>
Date:   Thu Jun 11 10:41:58 2020 -0300

    Merge branch 'master' into master

commit d3ba36e
Author: Lorran Rosa <[email protected]>
Date:   Thu Jun 11 10:39:36 2020 -0300

    Now code formatting is as it was

commit ad0e9ef
Author: Lorran Rosa <[email protected]>
Date:   Thu Jun 11 10:34:46 2020 -0300

    More code changes removals

commit e75ab5e
Author: Lorran Rosa <[email protected]>
Date:   Thu Jun 11 10:14:10 2020 -0300

    Remove format changes

commit 12ee5d8
Merge: 71abd12 1010f6a
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 22 20:26:38 2020 -0300

    Merge branch 'master' of https://github.com/SergioBenitez/Rocket

commit 71abd12
Author: Lorran Rosa <[email protected]>
Date:   Fri Apr 17 23:08:29 2020 -0300

    Code formatting

commit 5d526c8
Author: Lorran Rosa <[email protected]>
Date:   Fri Apr 17 23:03:43 2020 -0300

    After 2 freaking days I think finally finished fixing these tests lol

commit ef171cc
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 23:09:09 2020 -0300

    To find a matching 405 template to test_root

commit 42b4a14
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 23:05:33 2020 -0300

    Update tests

commit cd57e47
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 23:04:49 2020 -0300

    Fix route not interating in all matches.

commit 684d4d4
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:54:27 2020 -0300

    Code formatting, no additions..

commit 36544ba
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:50:41 2020 -0300

    Code formatting  using rustfmt

commit 1d42433
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:38:00 2020 -0300

    Tests

commit d93b4b1
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:22:59 2020 -0300

    Fixing form tests

commit 10d143e
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:22:39 2020 -0300

    Checking if requests method matches with route method.

commit ddc59f5
Author: Lorran Rosa <[email protected]>
Date:   Wed Apr 15 08:21:14 2020 -0300

    Removed matching with request_status

commit 1cc49ff
Author: Lorran Rosa <[email protected]>
Date:   Tue Apr 14 08:34:54 2020 -0300

    Returning 405 if http method doesn't match
@SergioBenitez
Copy link
Member

This approach unfortunately has significant performance impacts. To properly support 405 without a large performance impact, we would need to redesign our routing strategy entirely, perhaps to one based automata. Until then, we cannot implement this well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rocket should show 405 instead of 404 for method not allowed
2 participants