From 93131417e6c4b29df3a07b87c7ff93bcdee6b41b Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Mon, 24 Sep 2012 09:38:02 +0100 Subject: [PATCH] is_websocket_request() modified to check for the presence of keyword rather then euqality --- mongoose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index f638a68d..f0b88bd2 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3778,8 +3778,8 @@ static int is_websocket_request(const struct mg_connection *conn) { return host != NULL && upgrade != NULL && connection != NULL && key != NULL && version != NULL && - !mg_strcasecmp(upgrade, "websocket") && - !mg_strcasecmp(connection, "Upgrade"); + strstr(upgrade, "websocket") != NULL && + strstr(connection, "Upgrade") != NULL; } #endif // !USE_WEBSOCKET