-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workarounds to fudge & accept mildly invalid WebSocket protocols
Without this, WS will reject invalid subprotocols, for empty header values, or some syntactically incorrect values. Some real clients send these headers in ways that are accepted, so it's very useful to be able to intercept them, and the intent is clear: an empty-string value should be a null not-set protocol (and is generally treated as such). In a perfect world, we'd forward the subprotocol exactly as-is without this, and avoid taking an opinion entirely as long as we could do basic handling, but WS has opinions and ties our hands on that.
- Loading branch information
Showing
2 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters