From 9231d43308a9f44da67695d7cae2732197eb555c Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Thu, 16 Dec 2021 12:05:30 +0100 Subject: [PATCH] Issue #6728 - QUIC and HTTP/3 Added more logging about HTTP/3 being experimental. Signed-off-by: Simone Bordet --- .../org/eclipse/jetty/http3/client/HTTP3Client.java | 10 ++++++++++ .../http3-server/src/main/config/modules/http3.mod | 2 +- .../jetty/http3/server/HTTP3ServerConnector.java | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/jetty-http3/http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java b/jetty-http3/http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java index ab79662aa9a..69c8eed4406 100644 --- a/jetty-http3/http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java +++ b/jetty-http3/http3-client/src/main/java/org/eclipse/jetty/http3/client/HTTP3Client.java @@ -124,6 +124,9 @@ import org.slf4j.LoggerFactory; * /- [Control|Decoder|Encoder]Stream * HTTP3Client - dgramEP - ClientQuiConnection - ClientQuicSession - ClientHTTP3Session -* HTTP3Streams * + * + * @apiNote HTTP/3+QUIC support is experimental and not suited for production use. + * APIs may change incompatibly between releases. */ public class HTTP3Client extends ContainerLifeCycle { @@ -167,6 +170,13 @@ public class HTTP3Client extends ContainerLifeCycle return http3Configuration; } + @Override + protected void doStart() throws Exception + { + LOG.info("HTTP/3+QUIC support is experimental and not suited for production use."); + super.doStart(); + } + public CompletableFuture connect(SocketAddress address, Session.Client.Listener listener) { Map context = new ConcurrentHashMap<>(); diff --git a/jetty-http3/http3-server/src/main/config/modules/http3.mod b/jetty-http3/http3-server/src/main/config/modules/http3.mod index 54b34b21c9b..5bd6e19ca87 100644 --- a/jetty-http3/http3-server/src/main/config/modules/http3.mod +++ b/jetty-http3/http3-server/src/main/config/modules/http3.mod @@ -1,5 +1,5 @@ [description] -Enables the support for the HTTP/3 protocol. +Enables experimental support for the HTTP/3 protocol. [tags] connector diff --git a/jetty-http3/http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java b/jetty-http3/http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java index d5669c17944..fb4fff56d3a 100644 --- a/jetty-http3/http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java +++ b/jetty-http3/http3-server/src/main/java/org/eclipse/jetty/http3/server/HTTP3ServerConnector.java @@ -24,12 +24,19 @@ import org.eclipse.jetty.server.ConnectionFactory; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jetty.util.thread.Scheduler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** *

A HTTP/3 specific {@link QuicServerConnector} that configures QUIC parameters according to HTTP/3 requirements.

+ * + * @apiNote HTTP/3+QUIC support is experimental and not suited for production use. + * APIs may change incompatibly between releases. */ public class HTTP3ServerConnector extends QuicServerConnector { + private static final Logger LOG = LoggerFactory.getLogger(HTTP3ServerConnector.class); + private HttpField altSvcHttpField; public HTTP3ServerConnector(Server server, SslContextFactory.Server sslContextFactory, ConnectionFactory... factories) @@ -50,6 +57,7 @@ public class HTTP3ServerConnector extends QuicServerConnector @Override protected void doStart() throws Exception { + LOG.info("HTTP/3+QUIC support is experimental and not suited for production use."); super.doStart(); altSvcHttpField = new PreEncodedHttpField(HttpHeader.ALT_SVC, String.format("h3=\":%d\"", getLocalPort())); }