ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
891 stars 232 forks source link

Normalize headers in ws_upgrade #244

Closed rinpatch closed 3 years ago

rinpatch commented 3 years ago

In the documentation headers passed to ws_upgrade are typed as gun:req_headers(), however if a map of headers is passed (which is allowed by the type), the gun process will crash when trying to operate on it as if it were a list.

essen commented 3 years ago

PR is fine but is missing a test. Note that I am not merging anything until the http2-connect branch is merged this or next week.

rinpatch commented 3 years ago

Added a test that headers are normalized on ws_upgrade

essen commented 3 years ago

Merged, thanks!