Closed DaniD3v closed 7 months ago
The thing is, lower case letters in a method aren't illegal. post
is a valid method, even though it's not the same as POST
.
The thing is, lower case letters in a method aren't illegal.
post
is a valid method, even though it's not the same asPOST
.
What about at least adding a warning by using something like the log crate?
The
from_str
method documentation saysWhen I use
Method::from_str("post")
I expect it to error for not HTTP compliant methods instead of simply complying and sending the request.The header:
Especially for lowercase methods this can lead to errors that are hard to debug.
Partially because nginx handles wrong methods incorrectly. (See this stackoverflow thread).