Closed notbucai closed 4 years ago
Unless also won't work
As far a I can tell, According to the most recent RFC I can find for the HTTP spec (https://tools.ietf.org/html/rfc7230#page-83), spaces before the colon are not permitted:
header-field = field-name ":" OWS field-value OWS
As such, I don't think we should permit that.
But, optional whitespace is permitted after the colon and preceding Bearer
(as well as after the token itself).
I've submitted this PR to handle whitespace that conforms to the spec.
As far a I can tell, According to the most recent RFC I can find for the HTTP spec (https://tools.ietf.org/html/rfc7230#page-83), spaces before the colon are not permitted:
header-field = field-name ":" OWS field-value OWS
As such, I don't think we should permit that.
But, optional whitespace is permitted after the colon and preceding
Bearer
(as well as after the token itself).I've submitted this PR to handle whitespace that conforms to the spec.
thank you
Any space before and after
Authorization
header will result in the failure of koa-kwt to process and return an errorIf it's not a standard header it will return
Could not get any response
example
Authorization (There's a space here)
: "Bearer xxxxxx" returnCould not get any response
not error