haskell-servant / servant-snap

Snap port of servant-server (WIP)
Other
28 stars 18 forks source link

Fix duplicate import of headers from raw request #31

Closed imalsogreg closed 4 years ago

imalsogreg commented 4 years ago

Fixes #27

RoutingApplication.hs was pulling request headers from the raw snap request and adding them to the Request used by servant for routing. These headers were already being imported by snapToApplication, so we were adding them twice. Duplicate Content-Type: application/json headers apparently can not be parsed unless they include the ;charset=utf-8 suffix.