luckyframework / authentic

An authentication library for Lucky projects
MIT License
14 stars 13 forks source link

Avoid useless request.method.upcase #8

Closed vlazar closed 6 years ago

vlazar commented 6 years ago

HTTP method names are case-sensitive and standardized methods are all-appercase. See https://tools.ietf.org/html/rfc7231#section-4

vlazar commented 6 years ago

@paulcsmith Am I missing something and .upcase is required here?

paulcsmith commented 6 years ago

Thanks for the ping @vlazar. I missed this one.

Though the RFC says it should be all uppercase it is possible for someone to send a method that is lowercase. This ensures that even if they do that, the method is uppercased per the spec.

I may refactor this later so that it is uppercased further up the stack to ensure it works, but for now I'll keep this to make sure it is formatted correctly