浏览代码

modules/websocket: fixed mandatory headers check

Peter Dunkley 12 年之前
父节点
当前提交
8f74c57605
共有 1 个文件被更改,包括 2 次插入1 次删除
  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");