mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
fix websocket: read 16-bit length as unsigned
This commit is contained in:
parent
00b6efdcd5
commit
5301ed40ea
1 changed files with 1 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ module Reader = struct
|
||||||
let len = b1 land 0b0111_1111 in
|
let len = b1 land 0b0111_1111 in
|
||||||
if len = 126 then (
|
if len = 126 then (
|
||||||
IO.Input.really_input self.ic self.header_buf 0 2;
|
IO.Input.really_input self.ic self.header_buf 0 2;
|
||||||
Bytes.get_int16_be self.header_buf 0
|
Bytes.get_uint16_be self.header_buf 0
|
||||||
) else if len = 127 then (
|
) else if len = 127 then (
|
||||||
IO.Input.really_input self.ic self.header_buf 0 8;
|
IO.Input.really_input self.ic self.header_buf 0 8;
|
||||||
let len64 = Bytes.get_int64_be self.header_buf 0 in
|
let len64 = Bytes.get_int64_be self.header_buf 0 in
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue