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

Connection upgrade example #1

Open
belm0 opened this issue Aug 28, 2018 · 3 comments
Open

Connection upgrade example #1

belm0 opened this issue Aug 28, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@belm0
Copy link
Member

belm0 commented Aug 28, 2018

Would be great to have an example of upgrading a connection from http, based on the trio-server example in h11.

@mehaase
Copy link
Contributor

mehaase commented Sep 4, 2018

Thanks for all the feedback! I am going to start tackling these issues today.

@mehaase
Copy link
Contributor

mehaase commented Oct 11, 2018

I'm taking a look at h11's example trio-server.py. I think what you're asking for here is a documented example of the following:

  • A web server (like h11's trio-server.py) receives a new connection.
  • It processes the WebSocket HTTP upgrade request.
  • It wraps the resulting stream in a WebSocketConnection.

Is this right?

It's not clear to me if wsproto supports this: it looks like it always wants to do the HTTP upgrade request. To make this work, I think we would need a way for wsproto to skip the upgrade request and obtain that metadata (like host header) from somewhere else. Thoughts?

@mehaase
Copy link
Contributor

mehaase commented Oct 11, 2018

It looks like this behavior was submitted to wsproto but is currently on hold: python-hyper/wsproto#37

@mehaase mehaase added the enhancement New feature or request label Oct 25, 2018
@mehaase mehaase self-assigned this May 10, 2019
@mehaase mehaase removed their assignment May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants