aiortc / aioquic

QUIC and HTTP/3 implementation in Python
BSD 3-Clause "New" or "Revised" License
1.66k stars 236 forks source link

Add HTTP/2 Alt-Svc feature to HTTP3 Server/Client examples #473

Closed Zhang-Junzhi closed 7 months ago

Zhang-Junzhi commented 7 months ago

Add HTTP/2 Alt-Svc feature to HTTP3 Server/Client examples in order to help developers easily test and employ aioquic with normal UAs. Please consider it.

Zhang-Junzhi commented 7 months ago

Without examples that work with normal UAs, it's quite difficult for average Web developers to employ aioquic in reality to begin with.

rthalley commented 7 months ago

Do you mean that you want aioquic's example client to attempt HTTP/2 and process the Alt-Svc header? If so, that's not really the right thing for aioquic. I think what you want is better done inside of httpx when it eventually gets HTTP/3 support.

Zhang-Junzhi commented 7 months ago

Do you mean that you want aioquic's example client to attempt HTTP/2 and process the Alt-Svc header? If so, that's not really the right thing for aioquic. I think what you want is better done inside of httpx when it eventually gets HTTP/3 support.

No. Sorry for not being clear. I meant the server side (so that aioquic can be tested using normal browsers such as Chrome and Firefox), although I can figure it out by using an extra package such as aiohttp. Feel free to close it anyway, if you don't think it's the right thing for aioquic.

rthalley commented 7 months ago

You can also look at Hypercorn for the server side, as I remember it doing Alt-Svc. For Chrome-based browsers or Safari you can also publish an HTTPS record in the DNS.

Zhang-Junzhi commented 7 months ago

You can also look at Hypercorn for the server side, as I remember it doing Alt-Svc. For Chrome-based browsers or Safari you can also publish an HTTPS record in the DNS.

Thanks for your information.

rthalley commented 7 months ago

One last thing, Chrome wants real TLS certs for HTTP/3, so if you use a self-signed cert and it doesn't work, that's why.