ninenines / cowlib

Support library for manipulating Web protocols.
ISC License
279 stars 173 forks source link

Using compression for websockets fails because of zlib:zstream() not being a port anymore in OTP 20 #62

Closed jfacorro closed 6 years ago

jfacorro commented 6 years ago

The call to erlang:port_connect/2 here fails with badarg for OTP 20.1.1. This makes the cowboy_websocket to return a 400 here, but without any hint of what the problem is (in this case a 500 might be more appropriate?).

I pinged the author of the change in zilb here, because I couldn't find a workaround to the current situation.

essen commented 6 years ago

Thanks. I'm guilty of not having double checked Websocket compression with OTP 20.1. :-)

essen commented 6 years ago

It's probably worth opening a bug on bugs.erlang.org FYI.

jfacorro commented 6 years ago

I opened issue ERL-494 in bugs.erlang.org.

Thank you for all your work!

essen commented 6 years ago

zlib:set_controlling_process/2 was added in OTP 20.1.3.

essen commented 6 years ago

This should be fixed in most recent Cowlib (2.0.1) and Cowboy (master).