summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-01-19 15:38:51 +0000
committerAntony Dovgal <tony2001@php.net>2007-01-19 15:38:51 +0000
commit504e9e31f39a82391eb566f7b245a4bbe2b6b6d7 (patch)
tree6272c735a2ed2cf89b839dac651a655dfe30a323
parent4dafc7a2fa14d2a7dfab0fb45945478babda5655 (diff)
downloadphp-git-504e9e31f39a82391eb566f7b245a4bbe2b6b6d7.tar.gz
MFH: fix #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2)
-rw-r--r--NEWS2
-rw-r--r--ext/curl/interface.c4
2 files changed, 6 insertions, 0 deletions
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)) {