mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 20:49:01 -04:00
Always correctly add websocket frame length.
In certain scenarios the addition frame length would not be set, found the hard way.
This commit is contained in:
parent
1003cbcd50
commit
a572a9eeae
@ -174,7 +174,7 @@ websocket_frame_build(struct kore_buf *frame, u_int8_t op, const void *data,
|
|||||||
len_1 &= ~(1 << 7);
|
len_1 &= ~(1 << 7);
|
||||||
kore_buf_append(frame, &len_1, sizeof(len_1));
|
kore_buf_append(frame, &len_1, sizeof(len_1));
|
||||||
|
|
||||||
if (len_1 != len) {
|
if (len_1 > WEBSOCKET_PAYLOAD_SINGLE) {
|
||||||
switch (len_1) {
|
switch (len_1) {
|
||||||
case WEBSOCKET_PAYLOAD_EXTEND_1:
|
case WEBSOCKET_PAYLOAD_EXTEND_1:
|
||||||
net_write16((u_int8_t *)&len16, len);
|
net_write16((u_int8_t *)&len16, len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user