-
Notifications
You must be signed in to change notification settings - Fork 152
Conversation
Please do; RFC 7230 allows for custom methods, but I went a rather strict route. Ideally, we should allow any sequence RFC 7230 allows, which is a token; tokens are one or more of the following characters only:
This could be accounted for in the |
Is |
@gianarb Not sure I understand your comment… could you clarify? |
@weierophinney sorry it's a bad comment but I have seen a lot of implementation that use X-Method-Override to specify a custom method if it is not supports from original implementation. For example.. If you server not support PATCH you can send a POST with X-Method-Override: PATCH.. But maybe this is another use case.. |
@gianarb that's another use case; that would be something for the |
RFC 7230 allows request methods that consist of one or more tokens, which include the following characters: ``` !#$%&\'*+.^_`|~- ``` and any ASCII alphabetical characters or digits. This patch changes `validateMethod()` to use a regex that includes those characters, instead of comparing against a known list of HTTP methods.
'TRACE', | ||
]; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the above, as it's no longer necessary; validation is not against this list.
It will be nice feature to define own custom http method. Now it's not possible to override or add new one. I can provide PR, but I want to know what are you think about it.