From 2d7285f77a48eefaf198dae725301b7592c4e87d Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 6 Nov 2024 16:11:47 +1100 Subject: [PATCH] Undisable and fix PartialRFC2616Test --- .../org/eclipse/jetty/server/internal/HttpConnection.java | 3 +-- .../java/org/eclipse/jetty/server/PartialRFC2616Test.java | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java index 1b0723a22514..410c9b3c157a 100644 --- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java +++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal/HttpConnection.java @@ -1305,8 +1305,7 @@ public boolean is100ContinueExpected() { if (_unknownExpectation) { - _requestHandler.badMessage(new BadMessageException(HttpStatus.EXPECTATION_FAILED_417)); - return null; + throw new BadMessageException(HttpStatus.EXPECTATION_FAILED_417); } persistent = getHttpConfiguration().isPersistentConnectionsEnabled() && diff --git a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java index 45139f6b7550..c65b9f15d3f5 100644 --- a/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java +++ b/jetty-core/jetty-server/src/test/java/org/eclipse/jetty/server/PartialRFC2616Test.java @@ -27,7 +27,6 @@ import org.eclipse.jetty.server.handler.DumpHandler; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; @@ -410,7 +409,6 @@ public void test444() throws Exception * @see RFC 2616 - Section 5.2 - The Resource Identified by a Request */ @Test - @Disabled // TODO public void test521() throws Exception { // Default Host @@ -494,7 +492,6 @@ public void test81() throws Exception } @Test - @Disabled // TODO public void test10418() throws Exception { // Expect Failure @@ -550,7 +547,6 @@ public void test823() throws Exception } @Test - @Disabled // TODO public void test824() throws Exception { // Expect 100 not sent @@ -609,7 +605,6 @@ public void test94() } @Test - @Disabled // TODO public void test1423() throws Exception { try (StacklessLogging stackless = new StacklessLogging(HttpParser.class)) @@ -628,7 +623,7 @@ public void test1423() throws Exception offset = 0; response = connector.getResponse("GET /R1 HTTP/1.1\n" + "Host:\n" + "Connection: close\n" + "\n"); - offset = checkContains(response, offset, "HTTP/1.1 200", "200") + 1; + offset = checkContains(response, offset, "HTTP/1.1 400", "400") + 1; } }