Fix large frame >=65536 bytes header_size bug #37. Was being calculated as 8 (wrong). Now corrected to 10.
This commit is contained in:
+1
-1
@@ -252,7 +252,7 @@ class _RealWebSocket : public easywsclient::WebSocket
|
||||
ws.opcode = (wsheader_type::opcode_type) (data[0] & 0x0f);
|
||||
ws.mask = (data[1] & 0x80) == 0x80;
|
||||
ws.N0 = (data[1] & 0x7f);
|
||||
ws.header_size = 2 + (ws.N0 == 126? 2 : 0) + (ws.N0 == 127? 6 : 0) + (ws.mask? 4 : 0);
|
||||
ws.header_size = 2 + (ws.N0 == 126? 2 : 0) + (ws.N0 == 127? 8 : 0) + (ws.mask? 4 : 0);
|
||||
if (rxbuf.size() < ws.header_size) { return; /* Need: ws.header_size - rxbuf.size() */ }
|
||||
int i;
|
||||
if (ws.N0 < 126) {
|
||||
|
||||
Reference in New Issue
Block a user