php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40169 CURLOPT_TCP_NODELAY only available in curl >= 7.11.2
Submitted: 2007-01-19 15:22 UTC Modified: 2007-01-19 18:03 UTC
From: webmaster at bison-soft dot de Assigned:
Status: Closed Package: cURL related
PHP Version: 5.2.1RC3 OS: irrelevant
Private report: No CVE-ID: None
 [2007-01-19 15:22 UTC] webmaster at bison-soft dot de
Description:
------------
compile of curl extension in php 5.1.3rc3 fails when using libcurl < 7.11.2 because CURLOPT_TCP_NODELAY was first available in 7.11.2



Expected result:
----------------
Compiles cleanly even with curl version 7.10.6

Actual result:
--------------
usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c: In function `zm_startup_curl':
/usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c:455: `CURLOPT_TCP_NODELAY' undeclared (first use in this function)
/usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c:455: (Each undeclared identifier is reported only once
/usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c:455: for each function it appears in.)
/usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c: In function `_php_curl_setopt':
/usr/src/redhat/BUILD/php-5.2.1RC3/ext/curl/interface.c:1267: `CURLOPT_TCP_NODELAY' undeclared (first use in this function)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-19 15:38 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2007-01-19 17:57 UTC] webmaster at bison-soft dot de
Hello Tony,

IMHO, you have commentet out too much with your patch:

 		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:

Shouldn't the #if only cover CURLOPT_TCP_NODELAY so that curl_easy_setopt for the other two cases (CURLOPT_AUTOREFERER and CURLOPT_COOKIESESSION) is done? It would then look like

 		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:
+#endif
 			convert_to_long_ex(zvalue);
 			error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
 			break;
 [2007-01-19 18:03 UTC] tony2001@php.net
Yes, you're right, thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 08:01:27 2024 UTC