mirror of
https://github.com/predis/predis.git
synced 2026-08-28 11:09:49 +00:00
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:
@@ -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]";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user