forked from zwopple/PocketSocket
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow server delegate to return custom HTTP error response
* Added -server:acceptWebSocketWithRequest:response: delegate method that allows the delegate to return an HTTP status code and headers. * PSWebSocketServer now sends an HTTP response on failure instead of just closing the socket. * PSWebSocket now captures an HTTP error response from the peer and stores it in custom userInfo properties of the returned NSError so the client can see the HTTP status and headers when the connection fails. * Replaced custom CRLF-scanning code with calls to memmem(). * Removed a no-op line that triggered a static analyzer warning. Fixes zwopple#28
- Loading branch information
Showing
4 changed files
with
60 additions
and
41 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
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