mirror of
https://github.com/lammertb/libhttp.git
synced 2025-09-03 01:21:16 +03:00
is_websocket_request() modified to check for the presence of keyword rather then euqality
This commit is contained in:
@@ -3778,8 +3778,8 @@ static int is_websocket_request(const struct mg_connection *conn) {
|
|||||||
|
|
||||||
return host != NULL && upgrade != NULL && connection != NULL &&
|
return host != NULL && upgrade != NULL && connection != NULL &&
|
||||||
key != NULL && version != NULL &&
|
key != NULL && version != NULL &&
|
||||||
!mg_strcasecmp(upgrade, "websocket") &&
|
strstr(upgrade, "websocket") != NULL &&
|
||||||
!mg_strcasecmp(connection, "Upgrade");
|
strstr(connection, "Upgrade") != NULL;
|
||||||
}
|
}
|
||||||
#endif // !USE_WEBSOCKET
|
#endif // !USE_WEBSOCKET
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user