Skip to content

Reject invalid HTTP method token characters#833

Open
andrewkernel wants to merge 2 commits into
cherrypy:mainfrom
andrewkernel:fix-header-name-trailing-space
Open

Reject invalid HTTP method token characters#833
andrewkernel wants to merge 2 commits into
cherrypy:mainfrom
andrewkernel:fix-header-name-trailing-space

Conversation

@andrewkernel

Copy link
Copy Markdown

Summary

  • reject request-line methods containing characters outside the HTTP token grammar
  • add a regression test covering an invalid method containing (

Closes #715.

Testing

  • python -m pytest --no-cov -n 0 -p no:cacheprovider cheroot/test/test_core.py

@read-the-docs-community

read-the-docs-community Bot commented Jun 27, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cheroot | 🛠️ Build #33334500 | 📁 Comparing 25e9292 against latest (3937fe1)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

@codecov

codecov Bot commented Jun 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.83%. Comparing base (3937fe1) to head (25e9292).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #833      +/-   ##
==========================================
- Coverage   78.15%   77.83%   -0.33%     
==========================================
  Files          41       41              
  Lines        4788     4800      +12     
  Branches      547      548       +1     
==========================================
- Hits         3742     3736       -6     
- Misses        906      922      +16     
- Partials      140      142       +2     

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.

Cheroot's HTTP method parsing is too permissive

1 participant