When I connect to the websocket server using an unauthorized websocket url, the connect function does not return an error.
I expect the connection to fail because the server will return a 401 status code.
The corresponding code is resty/websocket/client.lua(line 197)
m, err = re_match(header, [[^\sHTTP/1.1\s+]], "jo")
why not change this line to
m, err = re_match(header, [[^\sHTTP/1.1\s+101]], "jo")
When I connect to the websocket server using an unauthorized websocket url, the connect function does not return an error. I expect the connection to fail because the server will return a 401 status code. The corresponding code is resty/websocket/client.lua(line 197) m, err = re_match(header, [[^\sHTTP/1.1\s+]], "jo") why not change this line to m, err = re_match(header, [[^\sHTTP/1.1\s+101]], "jo")