diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 10:29:54 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-04-08 10:29:54 +0200 |
commit | 6ea1d50ab6571551e1d0379940349911956c97ee (patch) | |
tree | e96a3c077a0b39675a693dee202fecd60c1946a3 /src/websock.c | |
parent | 54b2652e94cfa7840dbebcba46edd5459e7c6e86 (diff) |
new websocket handling
Change-Id: I71fc5ff0412af6badce77485c98016916c56d235
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/websock.c')
-rw-r--r-- | src/websock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websock.c b/src/websock.c index 41e063f8..c578eba4 100644 --- a/src/websock.c +++ b/src/websock.c @@ -199,10 +199,10 @@ static int check_control_header(struct websock *ws) return 0; if (FRAME_GET_RSV3(ws->header[0]) != 0) return 0; - if (FRAME_GET_MASK(ws->header[1])) - return 0; if (FRAME_GET_OPCODE(ws->header[0]) == OPCODE_CLOSE) return FRAME_GET_PAYLOAD_LEN(ws->header[1]) != 1; + if (FRAME_GET_MASK(ws->header[1])) + return 0; return FRAME_GET_PAYLOAD_LEN(ws->header[1]) == 0; } |