Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Support for HTTP auth challenges #28

Open
snej opened this issue Mar 31, 2015 · 0 comments
Open

Support for HTTP auth challenges #28

snej opened this issue Mar 31, 2015 · 0 comments

Comments

@snej
Copy link

snej commented Mar 31, 2015

The client doesn't recognize HTTP auth challenges, i.e. a 401 response status. Instead the connection just fails (with no indication why, because the API doesn't expose what the HTTP status was.)

There would need to be new API to support this. At the very least allowing the caller to register a username and password for Basic auth, but it'd be better to have a delegate-based auth-challenge callback similar to the one NSURLConnection uses.

snej added a commit to couchbasedeps/PocketSocket that referenced this issue Apr 12, 2015
* 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
@robertjpayne robertjpayne changed the title Doesn't handle HTTP auth Support for HTTP auth challenges Mar 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants