From b56c5b84ed5e85d5ddf7e505312c8e52145e979e Mon Sep 17 00:00:00 2001 From: Jan van Zadelhoff Date: Fri, 11 Feb 2022 08:32:01 +0100 Subject: [PATCH] use system properties when making requests, allowing proxy configuration --- .../eu/odp/harvest/geo/oai/xslt/HttpAwareUriResolver.java | 4 +++- src/main/resources/camel-oai-pmh.xml | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/odp/harvest/geo/oai/xslt/HttpAwareUriResolver.java b/src/main/java/eu/odp/harvest/geo/oai/xslt/HttpAwareUriResolver.java index 663a7f7..b6515a1 100644 --- a/src/main/java/eu/odp/harvest/geo/oai/xslt/HttpAwareUriResolver.java +++ b/src/main/java/eu/odp/harvest/geo/oai/xslt/HttpAwareUriResolver.java @@ -28,7 +28,9 @@ public class HttpAwareUriResolver extends XsltUriResolver { private final static Logger LOG = LogManager.getLogger(HttpAwareUriResolver.class); private static HttpClient httpClient = HttpClients.custom() - .setConnectionManager(new PoolingHttpClientConnectionManager()).build(); + .setConnectionManager(new PoolingHttpClientConnectionManager()) + .useSystemProperties() + .build(); private ProducerTemplate template; private CamelContext context; diff --git a/src/main/resources/camel-oai-pmh.xml b/src/main/resources/camel-oai-pmh.xml index ba97401..019fe57 100644 --- a/src/main/resources/camel-oai-pmh.xml +++ b/src/main/resources/camel-oai-pmh.xml @@ -122,7 +122,7 @@ - + @@ -201,7 +201,7 @@ POST - + @@ -282,7 +282,7 @@ - + @@ -442,7 +442,7 @@ - +