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

HTTP/3 Support #2378

Merged
merged 74 commits into from Jun 27, 2022
Merged

HTTP/3 Support #2378

merged 74 commits into from Jun 27, 2022

Conversation

ahopkins
Copy link
Member

@ahopkins ahopkins commented Jan 16, 2022

This PR is meant to primarily add HTTP/3 support using the QUIC protocol over UDP. This implementation will use aioquic to create the server.


Getting started

Currently, the best way to start in HTTP/3 mode is as follows:

$ sanic server:app --http=3 --dev

Starting in DEBUG mode will autogenerate a localhost TLS using mkcert or trustme. You will need to have a HTTP/3 capable client.


This only introduces support for HTTP requests, an we will release the feature as still "experimental". HTTP/3 support for websockets and webtransport is not yet included. That will probably come later this Summer.

@ahopkins ahopkins requested a review from a team as a code owner January 16, 2022 19:08
@ahopkins ahopkins marked this pull request as draft January 16, 2022 19:08
@Tronic
Copy link
Member

Tronic commented Jan 16, 2022

A few issues.... aioquic missing from deps, ugly tracebacks when mkcert is not installed and then

KeyError: '_run_request_middleware'

Uninstall and reinstall, or maybe just restart fixed the KeyError. Likely some other version of Sanic messing it up. I'll report more soon.

@Tronic
Copy link
Member

Tronic commented Jan 16, 2022

Seems to be working with curl3, although only serving HTTP/3 prevents browsers from connecting it. I gather this is supposed to multi-serve HTTP1 as well?

@ahopkins
Copy link
Member Author

Yeah of course, there is another PR where I am working out how that api should look.

@ahopkins
Copy link
Member Author

A few issues.... aioquic missing from deps, ugly tracebacks when mkcert is not installed and then

OH there are a lot more than a few issues 😆 Enough that's it probably not even worth calling out bugs yet because it's no where near an acceptable working version. At this stage it's still a question of architecture and structure.

@ahopkins ahopkins marked this pull request as ready for review June 20, 2022 13:40
@ahopkins ahopkins requested a review from a team as a code owner June 20, 2022 13:40
@ahopkins
Copy link
Member Author

Still adding some more tests to get better coverage, but the core of the PR is operational and is ready for some 👀.

@ahopkins ahopkins merged commit b59da49 into main Jun 27, 2022
27 checks passed
@ahopkins ahopkins deleted the http3 branch June 27, 2022 08:19
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

Successfully merging this pull request may close these issues.

None yet

2 participants