0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Fix handling of websocket fragmented deflated frames

This commit is contained in:
Ali Sabil 2013-07-02 12:36:26 +02:00
parent a3b9438d16
commit 6f0b8804bc

View file

@ -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= <<>>},