Prechádzať zdrojové kódy

modules/websocket: fixed mandatory headers check
(cherry picked from commit 8f74c57605fdd1d31c7808a3b8afc79cc981b370)

Peter Dunkley 12 rokov pred
rodič
commit
bb9a8ea4dc
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      modules/websocket/ws_handshake.c

+ 2 - 1
modules/websocket/ws_handshake.c

@@ -277,7 +277,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");