-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Need less restrictive HTTP method validation #951
Comments
Also I'm sorry this issue doesn't follow the issue template, but as this is a discussion more than a bug report I hope you can find it in your heart to forgive me. |
Please take a look on #960 |
Indeed that solves it for class based views at least, it still doesn't allow regular views as that's limited by the AbstractRoute implementation. Would it be of any harm to remove lines 84:86 from AbstractRoute, since technically the only definition of a HTTP method is that it only consists of alphanumeric characters. Actually, according to the HTTP 1.1 RFC a method can be any number of digits, letters or the symbols !#$%&'*+-.^_`|~. |
My main reason for keeping checks was preventing user from silly types. For example I wanted to have a error on writing Now thanks to #989 we have shortcut methods for server api, and we already had these for client. So my objection has gone away, we can relay checks significantly. @wolfhechel are you volunteered for this task? |
@asvetlov Absolutely, I still think that methods should be validated according to RFC 1.1 specifications though so I'll implement that instead. |
Fixed by #1037 |
First of all I'm sorry if this topic has been brought up before, I tried to search for a similar issue but couldn't find any.
As it is right now the only methods allowed for routing and requests are the ones defined in RFC7231 and RFC5789.
In reality there are far more methods used in the open like WebDAV methods (MOVE, COPY, UPDATE, LOCK, UNLOCK etc), GENA methods (SUBSCRIBE, UNSUBCRIBE, NOTIFY).
IANA lists the most common ones defined in RFC's at least, I was surprised to see GENA methods were missing though.
Point being, is there any reason as to why aiohttp is limited in this matter a part from the potential abuse in class-based views?
I know this is an issue already as I've done WebDAV and GENA work with aiohttp in projects, and as it is now I'm monkey-patching the method checks in order to allow route registration there.
The text was updated successfully, but these errors were encountered: