mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
is_websocket_request() modified to check for the presence of keyword rather then euqality
This commit is contained in:
parent
6ef5eb0665
commit
93131417e6
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user