Make SchemaCache use the HttpClient from the GeoTools hints

Description

Context: working behind a proxy and using cascaded WMS stores.

In the GeoTools hints it's possible to set an HTTP_CLIENT_FACTORY when one wants to use a proxy for outgoing HTTP requests.
However this is currently not taken into account by the org.geotools.xml.resolver.SchemaCache. The only way to configure a proxy for this class is to use the Java system properties (http.proxyHost, http.proxyPort). This might not be desirable if we don't want to route all HTTP traffic through the proxy. When working behind a proxy and if the proxy is not set, each request will timeout (default is 60 s) leading to a delay of several minutes for the creation of a cascaded WMS store.

Proposition: modify org.geotools.xml.resolver.SchemaCache so that it uses the HTTP client given by the hints if present, otherwise fallback to the SimpleHttpClient

Environment

None

Activity

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created May 17, 2024 at 1:40 PM
Updated July 15, 2024 at 9:39 AM
Resolved July 15, 2024 at 9:39 AM