mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 23:15:04 +00:00
This commit works around an issue with hostname verification in HttpClient when using IPv6 addresses in URLs. When an IPv6 address is used in a URL it is typically wrapped with square brackets. The hostname verifier for HttpClient does not recognize these as valid IPv6 addresses and instead treats them as a DNS name. We wrap the strict hostname verifier for this version of HttpClient and strip brackets if we need to. The corresponding issue in HttpClient is https://issues.apache.org/jira/browse/HTTPCLIENT-1698 but the fix has not been released yet in a stable version.