From: Michael Wallner Date: Wed, 27 Apr 2016 06:53:59 +0000 (+0200) Subject: fix issue #39 X-Git-Tag: RELEASE_2_6_0_BETA1~32 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3ad07f3509413fa7b2bfdba44155a8417eb76629;p=m6w6%2Fext-http fix issue #39 --- diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index f28f603..1b65fdf 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1261,7 +1261,9 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC) } #endif #if PHP_HTTP_CURL_VERSION(7,43,0) - if ((opt = php_http_option_register(registry, ZEND_STRL("proxy_service_name"), CURLOPT_PROXY_SERVICE_NAME, IS_STRING))) { + if (PHP_HTTP_CURL_FEATURE(CURL_VERSION_GSSAPI) + && (opt = php_http_option_register(registry, ZEND_STRL("proxy_service_name"), CURLOPT_PROXY_SERVICE_NAME, IS_STRING)) + ) { opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; } #endif diff --git a/src/php_http_curl.h b/src/php_http_curl.h index ab8b63c..0c533bd 100644 --- a/src/php_http_curl.h +++ b/src/php_http_curl.h @@ -17,6 +17,7 @@ #include #define PHP_HTTP_CURL_VERSION(x, y, z) (LIBCURL_VERSION_NUM >= (((x)<<16) + ((y)<<8) + (z))) +#define PHP_HTTP_CURL_FEATURE(f) (curl_version_info(CURLVERSION_NOW)->features & (f)) PHP_MINIT_FUNCTION(http_curl); PHP_MSHUTDOWN_FUNCTION(http_curl);