From 4c9fe1f532ac7943361cac81c2edd4484790ae68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 16 Feb 2017 11:13:29 +0100 Subject: Update a comment about zlib deflate option --- src/cow_ws.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cow_ws.erl b/src/cow_ws.erl index 24917bb..bf315eb 100644 --- a/src/cow_ws.erl +++ b/src/cow_ws.erl @@ -138,7 +138,8 @@ init_permessage_deflate(InflateWindowBits, DeflateWindowBits, Opts) -> Inflate = zlib:open(), ok = zlib:inflateInit(Inflate, -InflateWindowBits), Deflate = zlib:open(), - %% @todo Remove this case .. of for OTP 18+ if PR https://github.com/erlang/otp/pull/633 gets merged. + %% zlib 1.2.11+ now rejects -8. It used to transform it to -9. + %% We need to use 9 when 8 is requested for interoperability. DeflateWindowBits2 = case DeflateWindowBits of 8 -> 9; _ -> DeflateWindowBits -- cgit v1.2.3