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 #8559

Merged
merged 19 commits into from
Mar 9, 2023
Merged

HTTP/3 support #8559

merged 19 commits into from
Mar 9, 2023

Conversation

yawkat
Copy link
Member

@yawkat yawkat commented Jan 2, 2023

This PR adds HTTP/3 support for the server and client based on the experimental https://github.com/netty/netty-incubator-codec-http3 . The code is very similar to the existing HTTP/2 stack. The major differences relate to UDP vs TCP.

The HTTP/3 server is activated through a special listener protocol family QUIC (maybe this should be called UDP?). The client is activated by setting the alpn-modes to [h3] (switching to udp based on this property is a bit weird, but ALPN still exists with HTTP/3. eventually, falling back on tcp would be nice).

Server push is currently not supported. The test case for it in particular (netty-based) would need to be rewritten for UDP.

There are still a bunch of workarounds for netty bugs in this code. This is why this PR is a draft. The upstream PRs are:

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

❌ Java CI failed: https://ge.micronaut.io/s/pep52ujuucxnm

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

❌ GraalVM CE CI 17 dev failed: https://ge.micronaut.io/s/ipbmci72vcf5y

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 2, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 20 Code Smells

63.9% 63.9% Coverage
0.0% 0.0% Duplication

yawkat added 6 commits January 4, 2023 10:18
# Conflicts:
#	gradle/libs.versions.toml
#	http-server-netty/src/main/java/io/micronaut/http/server/netty/types/files/NettySystemFileCustomizableResponseType.java
# Conflicts:
#	http-client/build.gradle
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

❌ Java CI failed: https://ge.micronaut.io/s/qnhyl7kwjv6iq

@yawkat yawkat requested a review from graemerocher March 3, 2023 14:33
@yawkat yawkat marked this pull request as ready for review March 3, 2023 14:34
@yawkat yawkat requested a review from timyates March 3, 2023 14:34
@graemerocher
Copy link
Contributor

@yawkat
Copy link
Member Author

yawkat commented Mar 6, 2023

they are false positives

@graemerocher
Copy link
Contributor

in that case you can suppress them by adding @SupressWarnings("java:s3890") where is s3890 is whatever the sonar code is for the problem

@yawkat
Copy link
Member Author

yawkat commented Mar 6, 2023

@graemerocher ive disabled them in the sonar web interface, is that enough?

@graemerocher graemerocher added the type: enhancement New feature or request label Mar 6, 2023
@graemerocher graemerocher added this to the 4.0.0-M1 milestone Mar 7, 2023
Copy link
Contributor

@timyates timyates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the jdkClient docs to add Http3 to the list of unsupported things

And I guess we should add a check here to fail if Http3 is selected?

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

67.0% 67.0% Coverage
0.0% 0.0% Duplication

@graemerocher graemerocher merged commit 887aef4 into 4.0.x Mar 9, 2023
@graemerocher graemerocher deleted the http3 branch March 9, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants