aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_ws.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-02-16 11:13:29 +0100
committerLoïc Hoguin <[email protected]>2017-02-16 11:13:29 +0100
commit4c9fe1f532ac7943361cac81c2edd4484790ae68 (patch)
treece29f8ec968b8cb00c35786c153b442951793e36 /src/cow_ws.erl
parent0e7abe0b24593f131add272c275406d8ed231805 (diff)
downloadcowlib-4c9fe1f532ac7943361cac81c2edd4484790ae68.tar.gz
cowlib-4c9fe1f532ac7943361cac81c2edd4484790ae68.tar.bz2
cowlib-4c9fe1f532ac7943361cac81c2edd4484790ae68.zip
Update a comment about zlib deflate option
Diffstat (limited to 'src/cow_ws.erl')
-rw-r--r--src/cow_ws.erl3
1 files changed, 2 insertions, 1 deletions
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