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

Standard HTTP methods must be in uppercase #64

Open
arnu515 opened this issue Jan 16, 2025 · 0 comments · May be fixed by #65
Open

Standard HTTP methods must be in uppercase #64

arnu515 opened this issue Jan 16, 2025 · 0 comments · May be fixed by #65

Comments

@arnu515
Copy link

arnu515 commented Jan 16, 2025

The functions http/parse_method, and http/method_to_string treat methods as case-insensitive values by a) converting the method string to lowercase and then matching on it in the former's case, and b) returning lowercase strings in the latter's case

Standard HTTP methods must be sent in upperase, as declared in RFC 9110 — HTTP Standards:

The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names. By convention, standardized methods are defined in all-uppercase US-ASCII letters.

This is said to be a "convention", but it surely is enforced by Cloudflare, which controls quite a portion of the internet:

image

Hence, I believe that these methods should return and accept only uppercase characters for standard methods, instead of converting to lowercase/returning lowercase strings respectively.

Also converting to lowercase in parse_method should definitely not be done, since methods are case-sensitive, and aBCd does not equal abcd.

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 a pull request may close this issue.

1 participant