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

[Feat] Support ws and wss scheme in http_connect.lua #256

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

GuyLewin
Copy link
Contributor

No description provided.

@pintsized
Copy link
Member

This all looks good to me, but I'm not sure I understand the use case? How does this make sense as compared to say, the client in lua-resty-websocket?

Can you think of any useful tests we might add?

@GuyLewin
Copy link
Contributor Author

@pintsized I'll add tests, no problem.
We use your library as a proxy server, in which case we want to send any HTTP request the customer sends - even the initial HTTP(S) request to a WebSocket server.
In our code we then check if the response contains the Upgrade header and the HTTP 101 status. If it does - we take the inner socket and work directly with it. But we still use your library as a generic way to send the first HTTP request :)
If it makes sense - I'll write some tests and commit.

@pintsized
Copy link
Member

@GuyLewin Ah ok, got it, thanks. Sounds good to me.

@GuyLewin
Copy link
Contributor Author

@pintsized added tests, also added support for 'ws' and 'wss' scheme in parse_uri (which I think is important because users would probably parse_uri() before they connect())

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

Successfully merging this pull request may close these issues.

None yet

2 participants