Hello,
When downloading a FHIR package via URL (loadPackageUrlContents method), the HTTP request is built using an HttpClientBuilder that does not call .useSystemProperties(). As a result, standard JVM system properties (-Dhttp.proxyHost, -Dhttp.proxyPort, -Dhttps.proxyHost, -Dhttps.proxyPort, -Dhttp.nonProxyHosts, etc.) are completely ignored, and Apache HttpClient always attempts a direct connection to the target host.
In a corporate environment where outbound internet access is required to go through an HTTP proxy, this call fails with a timeout, even though the JVM proxy configuration is correct and works fine for the rest of the application.
Suggested fix
Simply add .useSystemProperties() when building the client:
ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc, method loadPackageUrlContents
HttpClientConnectionManager connManager = new BasicHttpClientConnectionManager();
try (CloseableHttpResponse request = HttpClientBuilder.create()
.setConnectionManager(connManager)
.useSystemProperties()
.build()
.execute(new HttpGet(thePackageUrl))) {
...
Thx for your help
Hello,
When downloading a FHIR package via URL (loadPackageUrlContents method), the HTTP request is built using an HttpClientBuilder that does not call .useSystemProperties(). As a result, standard JVM system properties (-Dhttp.proxyHost, -Dhttp.proxyPort, -Dhttps.proxyHost, -Dhttps.proxyPort, -Dhttp.nonProxyHosts, etc.) are completely ignored, and Apache HttpClient always attempts a direct connection to the target host.
In a corporate environment where outbound internet access is required to go through an HTTP proxy, this call fails with a timeout, even though the JVM proxy configuration is correct and works fine for the rest of the application.
Suggested fix
Simply add .useSystemProperties() when building the client:
ca.uhn.fhir.jpa.packages.loader.PackageLoaderSvc, method loadPackageUrlContents
Thx for your help