diff --git a/src/Unirest/Request.php b/src/Unirest/Request.php index 9f96eeb..cf0368c 100644 --- a/src/Unirest/Request.php +++ b/src/Unirest/Request.php @@ -416,7 +416,8 @@ class Request CURLOPT_HTTPHEADER => self::getFormattedHeaders($headers), CURLOPT_HEADER => true, CURLOPT_SSL_VERIFYPEER => self::$verifyPeer, - CURLOPT_SSL_VERIFYHOST => self::$verifyHost, + //CURLOPT_SSL_VERIFYHOST accepts only 0 (false) or 2 (true). Future versions of libcurl will treat values 1 and 2 as equals + CURLOPT_SSL_VERIFYHOST => self::$verifyHost === false ? 0 : 2, // If an empty string, '', is set, a header containing all supported encoding types is sent CURLOPT_ENCODING => '' ));