mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
fix for firefox secure websockets which for some reason writes only 1 byte first on secure ws frame
This commit is contained in:
parent
2aade020e9
commit
52e7a63bbf
@ -441,9 +441,11 @@ ssize_t ws_read_frame(wsh_t *wsh, ws_opcode_t *oc, uint8_t **data)
|
||||
}
|
||||
|
||||
if ((wsh->datalen = ws_raw_read(wsh, wsh->buffer, 14)) < need) {
|
||||
if ((wsh->datalen += ws_raw_read(wsh, wsh->buffer + wsh->datalen, 14 - wsh->datalen)) < need) {
|
||||
/* too small - protocol err */
|
||||
return ws_close(wsh, WS_PROTO_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
*oc = *wsh->buffer & 0xf;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user