This is an automated email from the ASF dual-hosted git repository.
Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 12cd328e9f0 camel-platform-http-starter: the Cookie request header is
no longer echoed on the response
12cd328e9f0 is described below
commit 12cd328e9f055ad76510e71c48db66debdf41c59
Author: croway <[email protected]>
AuthorDate: Wed Sep 2 15:56:29 2026 +0200
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 <[email protected]>
---
.../http/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 org.springframework.context.annotation.Configuration;
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 class SpringBootPlatformHttpCookiesTest {
.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"));
}