diff options
author | Loïc Hoguin <[email protected]> | 2015-08-26 19:44:35 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-08-26 19:44:35 +0200 |
commit | d7b72134d4013909a5fc0d45382e17bb2ee73d99 (patch) | |
tree | 5ad80c35840f60f856080237d0b0453d343eef42 /src/cow_ws.erl | |
parent | da64723955614e89e3dc3e1275f0871b4182e7f5 (diff) | |
parent | 95a41e6c941c12f34592f3fed911fd405e787b24 (diff) | |
download | cowlib-d7b72134d4013909a5fc0d45382e17bb2ee73d99.tar.gz cowlib-d7b72134d4013909a5fc0d45382e17bb2ee73d99.tar.bz2 cowlib-d7b72134d4013909a5fc0d45382e17bb2ee73d99.zip |
Merge branch 'master' of https://github.com/robashton/cowlib
Diffstat (limited to 'src/cow_ws.erl')
-rw-r--r-- | src/cow_ws.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cow_ws.erl b/src/cow_ws.erl index 611bfef..dcc81a5 100644 --- a/src/cow_ws.erl +++ b/src/cow_ws.erl @@ -580,7 +580,7 @@ masked_frame({binary, Payload}, _) -> [<< 1:1, 0:3, 2:4, 1:1, Len/bits >>, MaskKeyBin, mask(iolist_to_binary(Payload), MaskKey, <<>>)]. payload_length(Payload) -> - case byte_size(Payload) of + case iolist_size(Payload) of N when N =< 125 -> << N:7 >>; N when N =< 16#ffff -> << 126:7, N:16 >>; N when N =< 16#7fffffffffffffff -> << 127:7, N:64 >> |