Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected connection behavior #47

Open
warrenincn opened this issue Nov 6, 2019 · 0 comments
Open

unexpected connection behavior #47

warrenincn opened this issue Nov 6, 2019 · 0 comments

Comments

@warrenincn
Copy link

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, [[^\s*HTTP/1\.1\s+]], "jo")
why not change this line to
m, err = re_match(header, [[^\s*HTTP/1\.1\s+101]], "jo")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant