You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fasthttp/websocket module returns "websocket: bad handshake" error when HTTP response code is different than 101 or header values are incorrect. This hides any other non-websocket HTTP errors like 401 Unauthorized, 404 Not Found, 500 Internal Server Error, etc. Recently I was debugging one such issue and had to modify fasthttp/websocket to see what was wrong. Please add new error to report non-101 response from server. Make sure to allow getting HTTP status code from error - some errors may need special handling beside logging, e.g. prompt user for credentials when server returns 401 Unauthorized.
fasthttp/websocket module returns "websocket: bad handshake" error when HTTP response code is different than 101 or header values are incorrect. This hides any other non-websocket HTTP errors like 401 Unauthorized, 404 Not Found, 500 Internal Server Error, etc. Recently I was debugging one such issue and had to modify fasthttp/websocket to see what was wrong. Please add new error to report non-101 response from server. Make sure to allow getting HTTP status code from error - some errors may need special handling beside logging, e.g. prompt user for credentials when server returns 401 Unauthorized.
https://github.com/fasthttp/websocket/blob/master/client.go#L393-L396
The text was updated successfully, but these errors were encountered: