gleam-lang / cowboy

🤠 A Gleam HTTP service adapter for the Cowboy web server
Apache License 2.0
67 stars 13 forks source link

Error if a set-cookie header is set on the response #3

Closed CrowdHailer closed 4 years ago

CrowdHailer commented 4 years ago

cowboy treats the set-cookie header as a special case

https://github.com/ninenines/cowboy/blob/master/src/cowboy_http.erl#L1218

CrowdHailer commented 4 years ago

There are a few issues that show people have tripped over this difference before.

It's worth noting that the type spec for headers in cowboy does not correctly encompass this. https://github.com/ninenines/cowboy/blob/master/src/cowboy.erl#L34 Potentially a PR to fix that would be valuable.

To wrap cowboy will require treating this header as a special case