Starscream icon indicating copy to clipboard operation
Starscream copied to clipboard

Feature Request: Support for HTTP Redirect (Status 3xx)

Open ndreisg opened this issue 8 years ago • 2 comments

It would be useful to have support for redirects like 3xx HTTP status.

According to WebSocket Protocol Specification from IETF, clients are not required to follow redirects, but they may do it. So this could probably be a feature that can be switched on/off with a boolean or so :)

Quote from https://tools.ietf.org/html/rfc6455:

   1.  If the status code received from the server is not 101, the
       client handles the response per HTTP [RFC2616] procedures.  In
       particular, the client might perform authentication if it
       receives a 401 status code; the server might redirect the client
       using a 3xx status code (but clients are not required to follow
       them), etc.  Otherwise, proceed as follows.

ndreisg avatar Nov 30 '17 16:11 ndreisg

I agree. That is something that will have to be hand added because we are using a pure NSStream. I'd love if we could have NSURLSession support in the future to handle more HTTP needs like this, but that will require a bit of updating by Apple to the NSURLSession API.

daltoniam avatar Jan 14 '18 02:01 daltoniam

Has this potentially changed since 2018?

gsabran avatar May 23 '22 23:05 gsabran