Module: sip-router Branch: master Commit: 8f74c57605fdd1d31c7808a3b8afc79cc981b370 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8f74c576...
Author: Peter Dunkley peter.dunkley@crocodile-rcs.com Committer: Peter Dunkley peter.dunkley@crocodile-rcs.com Date: Mon Apr 29 20:54:52 2013 +0100
modules/websocket: fixed mandatory headers check
---
modules/websocket/ws_handshake.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/websocket/ws_handshake.c b/modules/websocket/ws_handshake.c index 40dfbb3..a719919 100644 --- a/modules/websocket/ws_handshake.c +++ b/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");