Commit 93131417 authored by Sergey Lyubka's avatar Sergey Lyubka

is_websocket_request() modified to check for the presence of keyword rather then euqality

parent 6ef5eb06
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment