Skip to content

Fix logical test when parsing WebSocket request.#187

Open
VaslD wants to merge 1 commit intoChangbaDevs:masterfrom
VaslD:fix-incorrect-comparison
Open

Fix logical test when parsing WebSocket request.#187
VaslD wants to merge 1 commit intoChangbaDevs:masterfrom
VaslD:fix-incorrect-comparison

Conversation

@VaslD
Copy link

@VaslD VaslD commented Apr 15, 2025

WebSocket.m:116:11: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]

This seems like a critical typo. [NSString caseInsensitiveCompare:] would never return null for a non-null string, thus the comparison would actually be reversed: Checking for "WebSocket" and then setting isWebSocket to false.

WebSocket.m:116:11: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
@VaslD VaslD changed the title Fix logical test. Fix logical test when parsing WebSocket request. Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant