Commit 5dec678b authored by Italo Guerrieri's avatar Italo Guerrieri Committed by Ignacio Casal Quinteiro
Browse files

Fix reserved opcode

Some opcode are reserved for future implementations of the
WebSocket protocol. If these reserved code are send,
the connection needs to be closed.
Fix Autobahn test cases 4.*.

https://bugzilla.gnome.org/show_bug.cgi?id=792113
parent 3eadca3e
......@@ -691,7 +691,8 @@ process_contents (SoupWebsocketConnection *self,
break;
default:
g_debug ("received unsupported control frame: %d", (int)opcode);
break;
protocol_error_and_close (self);
return;
}
} else if (pv->close_received) {
g_debug ("received message after close was received");
......@@ -757,7 +758,8 @@ process_contents (SoupWebsocketConnection *self,
break;
default:
g_debug ("received unknown data frame: %d", (int)opcode);
break;
protocol_error_and_close (self);
return;
}
/* Actually deliver the message? */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment