Fix WebdisConnection with IPv4 hosts.

Apparently something changed since last time in cURL internals and now
an IPv4 wrapped by square brackets (which are used for IPv6 addresses)
returns a malformed request error.
This commit is contained in:
Daniele Alessandri
2020-09-04 17:53:16 +02:00
parent ac543999ef
commit 67487528eb
+1 -1
View File
@@ -119,7 +119,7 @@ class WebdisConnection implements NodeConnectionInterface
$parameters = $this->getParameters();
$timeout = (isset($parameters->timeout) ? (float) $parameters->timeout : 5.0) * 1000;
if (filter_var($host = $parameters->host, FILTER_VALIDATE_IP)) {
if (filter_var($host = $parameters->host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
$host = "[$host]";
}