You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2023/05/11 11:55:40 UTC
[camel] 01/03: Netty-Http component: header parameters cannot start with a whitespace
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-3.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 37776b2a46f34eb77b03d2d1055c777c5dba4345
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Nov 11 12:02:33 2022 +0100
Netty-Http component: header parameters cannot start with a whitespace
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../http/NettyHttpGetWithParamAsExchangeHeaderTest.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGetWithParamAsExchangeHeaderTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGetWithParamAsExchangeHeaderTest.java
index f4658dc9445..14aedde39bf 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGetWithParamAsExchangeHeaderTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpGetWithParamAsExchangeHeaderTest.java
@@ -68,11 +68,11 @@ public class NettyHttpGetWithParamAsExchangeHeaderTest extends BaseNettyTest {
public void testHttpGetWithSpaceEncodedInParams() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
- mock.expectedHeaderReceived("message", " World");
+ mock.expectedHeaderReceived("message", "Wor ld");
mock.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
// parameter starts with a space using %20 as decimal encoded
- template.requestBody(serverUri + "&message=%20World", null, Object.class);
+ template.requestBody(serverUri + "&message=Wor%20ld", null, Object.class);
assertMockEndpointsSatisfied();
}
@@ -81,11 +81,11 @@ public class NettyHttpGetWithParamAsExchangeHeaderTest extends BaseNettyTest {
public void testHttpGetWithSpaceInParams() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
- mock.expectedHeaderReceived("message", " World");
+ mock.expectedHeaderReceived("message", "Wor ld");
mock.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
// parameter starts with a space
- template.requestBody(serverUri + "&message= World", null, Object.class);
+ template.requestBody(serverUri + "&message=Wor ld", null, Object.class);
assertMockEndpointsSatisfied();
}
@@ -94,11 +94,11 @@ public class NettyHttpGetWithParamAsExchangeHeaderTest extends BaseNettyTest {
public void testHttpGetWithSpaceAsPlusInParams() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
- mock.expectedHeaderReceived("message", " World");
+ mock.expectedHeaderReceived("message", "Wor ld");
mock.expectedHeaderReceived(Exchange.HTTP_METHOD, "GET");
// parameter starts with a space
- template.requestBody(serverUri + "&message=+World", null, Object.class);
+ template.requestBody(serverUri + "&message=Wor+ld", null, Object.class);
assertMockEndpointsSatisfied();
}