From 81f1ec2ed70e55fdb833f3db8b0d82b56ad96e14 Mon Sep 17 00:00:00 2001 From: croway Date: Wed, 2 Sep 2026 15:56:29 +0200 Subject: [PATCH] camel-platform-http-starter: the Cookie request header is no longer echoed on the response SpringBootPlatformHttpCookiesTest.echoCookie asserted that a lowercase "cookie" request header comes back on the response. PlatformHttpEndpoint wraps the header filter strategy so that common request headers such as Cookie are never echoed, and since CAMEL-24453 that comparison is case-insensitive, so the lowercase spelling is suppressed as well and the test has been failing against the current camel-platform-http snapshot. The test now asserts the suppression: the response carries no cookie header for the echo route. Co-Authored-By: Claude Fable 5.1 --- .../springboot/SpringBootPlatformHttpCookiesTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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")); }