diff --git a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCookiesTest.java b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCookiesTest.java index bf1d34b80d9..e91e0273381 100644 --- a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCookiesTest.java +++ b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCookiesTest.java @@ -42,7 +42,7 @@ import static io.restassured.RestAssured.given; import static io.restassured.matcher.RestAssuredMatchers.detailedCookie; import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.startsWith; +import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.assertEquals; @EnableAutoConfiguration @@ -231,15 +231,19 @@ public void replaceCookie() { .body(equalTo("replace")); } + /** + * The Cookie request header must not be echoed back on the response, whatever its casing: platform-http suppresses + * the common request headers case-insensitively since CAMEL-24453. + */ @Test - public void echoCookie() { + public void cookieRequestHeaderIsNotEchoed() { given() .header("cookie", "echo=cookie") .when() .get("/echo") .then() .statusCode(200) - .header("cookie", startsWith("echo=cookie")) + .header("cookie", nullValue()) .body(equalTo("echo")); }