Closed loyddetroz closed 1 year ago
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.
@loyddetroz are you using createTwirpServer
or createTwirpServerless
?
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
Narrowed it down to this line: https://github.com/tatethurston/TwirpScript/blob/2550b1e40bf6d2b09e372b6ff1fffa3d2db3f81f/packages/twirpscript/src/runtime/server/index.ts#L193
Hope you can correct me if I'm wrong or if there was any reasoning for this deliberate choice. :)