From 5678ef7c96217417629c3ef6f88853742cf2a626 Mon Sep 17 00:00:00 2001 From: Francesco Nigro Date: Thu, 14 Dec 2023 18:25:20 +0100 Subject: [PATCH] remove */* case --- .../jboss/resteasy/reactive/common/util/ServerMediaType.java | 3 --- .../resteasy/reactive/server/handlers/ClassRoutingHandler.java | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/ServerMediaType.java b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/ServerMediaType.java index 30a3becb1900a0..c1a999ced85571 100644 --- a/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/ServerMediaType.java +++ b/independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/util/ServerMediaType.java @@ -110,9 +110,6 @@ public boolean isRawAcceptedWithSingleProduces(String accept, int length) { end--; } int trimmedAcceptLength = end - start + 1; - if (trimmedAcceptLength == 3 && "*/*".regionMatches(0, accept, start, 3)) { - return true; - } // WARNING: this is strict for security reasons ie a malformed accept header element will not match // otherwise we would have been forced to parse the rest of accept header (eg params) // see https://www.rfc-editor.org/rfc/rfc2616#section-14.1 diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java index 5b8142cba394bd..0fe1a9e6e65933 100644 --- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java +++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/handlers/ClassRoutingHandler.java @@ -201,8 +201,7 @@ private boolean acceptHeaderMatches(RequestMapper.RequestMatch * This is the case with 2 Accepted types and a single Produces type */ private boolean acceptHeaderMatchesSingleProduces(String accepts, MediaType producesMediaType, int commaIndex) { - System.out.println("acceptHeaderMatchesSingleProduces: " + accepts + ", " + producesMediaType + ", " + commaIndex); - System.exit(0); + System.out.println("***************** acceptHeaderMatchesSingleProduces: " + accepts + ", " + producesMediaType + ", " + commaIndex); var firstMediaType = toMediaType(accepts.substring(0, commaIndex).trim()); if (producesMediaType.isCompatible(firstMediaType)) { return true;