Content-Type key in header is case-sensitive
loyddetroz opened this issue · 2 comments
loyddetroz commented
Minor issue. Right now the content type keyword is being matched to a lower-case key which gives this error upon sending a request:
e.g. in headers in Postman
Content-Type: application/json
{
"code": "malformed",
"msg": "no request content-type provided"
}
Narrowed it down to this line:
Hope you can correct me if I'm wrong or if there was any reasoning for this deliberate choice. :)
tatethurston commented
Thanks @loyddetroz, happy to make this case insensitive. The HTTP2 spec requires lower case header keys, but TwirpScript should fully support the HTTP 1.x specification.
tatethurston commented
@loyddetroz are you using createTwirpServer
or createTwirpServerless
?