Commit 0131c660 authored by Steffen Michels's avatar Steffen Michels

Merge branch 'websocket-messages-with-125-bytes' into 'master'

Fix encoding of websocket messages of exactly 125 bytes

See merge request !335
parents f9f21a17 aa1b54f3
Pipeline #30789 passed with stage
in 5 minutes and 50 seconds
......@@ -116,7 +116,7 @@ wsockPongMsg payload = wsockControlFrame WS_OP_PONG payload
wsockMsgFrame :: !Int !Bool !String -> String
wsockMsgFrame opcode final payload
| num_bytes < 125 = frame num_bytes "" payload
| num_bytes <= 125 = frame num_bytes "" payload
| num_bytes < 65536 = frame 126 {toChar (num_bytes >> (8*i)) \\ i <- [1,0]} payload
| otherwise = IF_INT_64_OR_32
(frame 127 {toChar (num_bytes >> (8*i)) \\ i <- [7,6,5,4,3,2,1,0]} payload)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment