diff --git a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java index 2664adceb7a..0dac59d2f06 100644 --- a/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java +++ b/jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java @@ -332,7 +332,7 @@ public class HttpTransportOverHTTP2 implements HttpTransport stream.setAttachment(endPoint); if (request.getHttpInput().hasContent()) return channel.sendErrorOrAbort("Unexpected content in CONNECT request"); - return true; + return false; } @Override diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 0df6668f113..c036d746728 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -736,7 +736,7 @@ public class HttpChannel implements Runnable, HttpOutput.Interceptor *

This avoids a race where the server is unprepared if the client sends * data immediately after having received the upgrade response.

* @return true if the channel is not complete and more processing is required, - * either because the upgrade has succeeded or sendError has been called. + * typically because sendError has been called. */ protected boolean checkAndPrepareUpgrade() {