From: Antony Dovgal Date: Fri, 19 Jan 2007 15:38:51 +0000 (+0000) Subject: MFH: fix #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2) X-Git-Tag: RELEASE_1_2_3~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=504e9e31f39a82391eb566f7b245a4bbe2b6b6d7;p=php MFH: fix #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2) --- diff --git a/NEWS b/NEWS index 2e3ead5f70..217fe23860 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jan 2007, PHP 5.2.1RC4 +- Fixed bug #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2). + (Tony) 18 Jan 2007, PHP 5.2.1RC3 - Added read-timeout context option "timeout" for HTTP streams. (Hannes, diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 9acccad7d9..6690c73adc 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -452,7 +452,9 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_PROXYPORT); REGISTER_CURL_CONSTANT(CURLOPT_UNRESTRICTED_AUTH); REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPRT); +#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */ REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY); +#endif REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES); REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE); REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE); @@ -1264,10 +1266,12 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_PORT: case CURLOPT_AUTOREFERER: case CURLOPT_COOKIESESSION: +#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */ case CURLOPT_TCP_NODELAY: convert_to_long_ex(zvalue); error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue)); break; +#endif case CURLOPT_FOLLOWLOCATION: convert_to_long_ex(zvalue); if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {