Forums - HTTP redirect on websocket

1 post / 0 new
HTTP redirect on websocket
jesse
Join Date: 22 Aug 17
Posts: 22
Posted: Wed, 2021-06-02 07:19

On the web server I want to be able to redirect a websocket connection from a QCA4020 device to a different server by returning a 307 status. This fails with the websocket returning a close status of 1008 for "policy violation". Not only does QAPI not follow the redirect, there is no way for me to see that the server is issuing a redirect. There is no way to get the HTTP status code or the new location.

How can I follow an HTTP redirect on a websocket with QAPI?

From https://datatracker.ietf.org/doc/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.
 
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.