aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Sabil <[email protected]>2013-07-02 12:36:26 +0200
committerAli Sabil <[email protected]>2013-07-02 13:46:28 +0200
commit6f0b8804bca12cfe3e8dc5798c819e3f16c6936e (patch)
tree3b27b5fa8ebb464b3e25c42e240b641a670a814c
parenta3b9438d16eceb61584b1637b2de4d66c0aadfc5 (diff)
downloadcowboy-6f0b8804bca12cfe3e8dc5798c819e3f16c6936e.tar.gz
cowboy-6f0b8804bca12cfe3e8dc5798c819e3f16c6936e.tar.bz2
cowboy-6f0b8804bca12cfe3e8dc5798c819e3f16c6936e.zip
Fix handling of websocket fragmented deflated frames
-rw-r--r--src/cowboy_websocket.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl
index 918c9e6..54dbcd9 100644
--- a/src/cowboy_websocket.erl
+++ b/src/cowboy_websocket.erl
@@ -421,7 +421,7 @@ websocket_payload(State=#state{frag_state={Fin, 1, _}, utf8_state=Incomplete},
<< End:Len/binary, Rest/bits >> = Data,
Unmasked2 = websocket_unmask(End,
rotate_mask_key(MaskKey, UnmaskedLen), <<>>),
- {Unmasked3, State2} = websocket_inflate_frame(Unmasked2, Rsv, true, State),
+ {Unmasked3, State2} = websocket_inflate_frame(Unmasked2, Rsv, Fin =:= fin, State),
case is_utf8(<< Incomplete/binary, Unmasked3/binary >>) of
<<>> ->
websocket_dispatch(State2#state{utf8_state= <<>>},