deprecate default all-method routes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 838
- Forks
- 123
- Avg merge
- 7h 58m
- Merged PRs (30d)
- 12
Description
HTTP GET and HTTP POST are very different verbs, that should be very differently handled. If you are intending to write a POST handler, but accidentally include GET too, that's a security issue.
From the Werkzeug docs, "methods" is
A sequence of http methods this rule applies to. If not specified, all methods are allowed.
I don't think it's a good idea to ever call Klein.route() without explicitly passing a list of methods, and generally that list should be one method or the other, so it should be more convenient and easy to pass that along.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Klein.route() entry point and review how its methods argument currently follows Werkzeug's default. Determine the deprecation and migration behavior needed when methods is omitted, including how an explicit single-method route should be represented. Done means the new behavior is documented and covered by the relevant routing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100