Browse Source

modules/websocket: fixed mandatory headers check

Peter Dunkley 12 years ago
parent
commit
8f74c57605
1 changed files with 2 additions and 1 deletions
  1. 2 1
      modules/websocket/ws_handshake.c

+ 2 - 1
modules/websocket/ws_handshake.c

@@ -306,7 +306,8 @@ int ws_handle_handshake(struct sip_msg *msg)
 
 	/* Final check that all required headers/values were found */
 	sub_protocol &= ws_sub_protocols;
-	if (hdr_flags != REQUIRED_HEADERS || sub_protocol == 0)
+	if ((hdr_flags & REQUIRED_HEADERS) != REQUIRED_HEADERS
+			|| sub_protocol == 0)
 	{
 
 		LM_WARN("required headers not present\n");