From 2d4693a2887c93eaaf2d4a84521be1e926ac1539 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Fri, 27 Aug 2021 14:51:07 +1000 Subject: [PATCH] Issue #6642 - check for null Metadata in HttpConnection Signed-off-by: Lachlan Roberts --- .../src/main/java/org/eclipse/jetty/server/HttpConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java index d34b9f7b924..1b027cea629 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpConnection.java @@ -886,7 +886,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http @Override protected void onCompleteSuccess() { - boolean upgrading = _info.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101; + boolean upgrading = _info != null && _info.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101; release().succeeded(); // If successfully upgraded it is responsibility of the next protocol to close the connection. if (_shutdownOut && !upgrading)