Closed tathougies closed 9 years ago
Yes, this is a known bug (in fact it's a duplicate of #8, which I'm closing because this one has more info). Your solution sounds good, pull requests are welcome!
If pull request #72 was merged, why is this issue still open?
Because we didn't close it? ;) Thanks for drawing our attention to it.
rest
currently parses HTTP headers as case sensitive. The HTTP standard says that they ought to be treated case insensitive. This is especially a problem because the Node.js javascript generated by rest-gen sends the header "Content-type" for POST requests andRest.Driver.Perform
callsgetHeader "Content-Type"
. This means that the Javascript client library generated by rest-gen doesn't actually work with the API when serving the API via WAI and Warp.This may not affect the Happstack and Snap backends because they call the underlying server's
getHeader
function which treats header names correctly.One solution would be to change the type of
RestInput.headers
toHashMap (CI String) String
inRest.Driver.RestM