aboutsummaryrefslogtreecommitdiffstats
path: root/src/cow_ws.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-08-26 19:44:35 +0200
committerLoïc Hoguin <[email protected]>2015-08-26 19:44:35 +0200
commitd7b72134d4013909a5fc0d45382e17bb2ee73d99 (patch)
tree5ad80c35840f60f856080237d0b0453d343eef42 /src/cow_ws.erl
parentda64723955614e89e3dc3e1275f0871b4182e7f5 (diff)
parent95a41e6c941c12f34592f3fed911fd405e787b24 (diff)
downloadcowlib-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.erl2
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 >>