Feature Request: Support for HTTP Redirect (Status 3xx)
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.
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.
Has this potentially changed since 2018?