This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new f4bf751 CAMEL-17521: camel-http - Fix toD with http should not
include httpClient. options.
f4bf751 is described below
commit f4bf751eb1b26415acae9d00ad80c9b4682ea88f
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jan 21 13:01:24 2022 +0100
CAMEL-17521: camel-http - Fix toD with http should not include httpClient.
options.
---
.../camel/component/http/HttpSendDynamicAware.java | 17 +++++++++++++++++
.../camel/component/http/HttpToDSOTimeoutTest.java | 2 --
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpSendDynamicAware.java
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpSendDynamicAware.java
index 7e76c0d..4f21e58 100644
---
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpSendDynamicAware.java
+++
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpSendDynamicAware.java
@@ -16,9 +16,26 @@
*/
package org.apache.camel.component.http;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
import org.apache.camel.spi.annotations.SendDynamic;
@SendDynamic("http,https")
public class HttpSendDynamicAware extends
org.apache.camel.http.base.HttpSendDynamicAware {
+ @Override
+ public Map<String, Object> endpointLenientProperties(Exchange exchange,
String uri) throws Exception {
+ Map<String, Object> answer = new LinkedHashMap<>();
+
+ // workaround as we need to remove all prefix options as they are not
part of lenient properties
+ Map<String, Object> properties =
super.endpointLenientProperties(exchange, uri);
+ properties.forEach((k, v) -> {
+ if (!k.startsWith("httpClient.")) {
+ answer.put(k, v);
+ }
+ });
+ return answer;
+ }
}
diff --git
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
index 0c3930a..708782a 100644
---
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
+++
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
@@ -24,7 +24,6 @@ import org.apache.http.impl.bootstrap.HttpServer;
import org.apache.http.impl.bootstrap.ServerBootstrap;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.apache.camel.component.http.HttpMethods.GET;
@@ -80,7 +79,6 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
}
@Test
- @Disabled("TODO: https://issues.apache.org/jira/browse/CAMEL-17521")
public void httpToD() throws Exception {
Exchange exchange = template.request("direct:toD",
exchange1 -> {