- /// needed, such as digest or ntlm auth
- $useCurl = ($method == 'https' || $method == 'http11');
+ /// needed, such as digest or ntlm auth. Do not attempt to use it for https if not present
+ $useCurl = ($this->use_curl == self::USE_CURL_ALWAYS) || ($this->use_curl == self::USE_CURL_AUTO &&
+ ($method == 'https' || $method == 'http11'));