mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Websocket offset validation enhancement
This commit is contained in:
1 parent
539d080346
commit
cdc439bc38
3 files changed
+3
-2
No files matched your search
@@ -811,6 +811,7 @@ static void wcb(struct mg_connection *c, int ev, void *ev_data) {
|
||||
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
|
||||
struct mg_str *wsproto = mg_http_get_header(hm, "Sec-WebSocket-Protocol");
|
||||
ASSERT(wsproto != NULL);
|
||||
mg_ws_send(c, "hello", 0, 0);
|
||||
mg_ws_printf(c, WEBSOCKET_OP_BINARY, "%.3s", "boo!!!!");
|
||||
mg_ws_printf(c, WEBSOCKET_OP_BINARY, "%s", "foobar");
|
||||
mg_ws_send(c, "", 0, WEBSOCKET_OP_PING);
|
||||
|
||||
Reference in new issue
Block a user