Bug #66831 [NEW]: curl_opt does not give any warning if CURLOPT_COOKIE* are not supported by cURL
| From: | lytboris@php.net | Date: | Thu, 06 Mar 2014 07:38:07 +0000 |
| Subject: | Bug #66831 [NEW]: curl_opt does not give any warning if CURLOPT_COOKIE* are not supported by cURL | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-184550@lists.php.net to get a copy of this message | ||
From: lytboris
Operating system: FreeBSD
PHP version: Irrelevant
Package: cURL related
Bug Type: Bug
Bug description:curl_opt does not give any warning if CURLOPT_COOKIE* are not supported by cURL
Description:
------------
There is a way to compile cURL without cookies support
(--disable-cookies).
When it is done so every call curl_setopt() with COOKIE-related option
will silently return FALSE without emitting any warning to user.
When it is done this way, cURL library will return a
CURLE_UNKNOWN_OPTION (line 2488 in cURL lib/url.c) status code when
trying to set an unsupported option. There should be a warning in such
cases. That will alert user not only in case of disabled cookies
support, but in all simmilar cases (when cURL library is build without
support for some feature).
Test script:
---------------
<?php
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIE, "QQQ=12345"));
curl_close($ch);
?>
Expected result:
----------------
bool(false)
Warning: option XXX is not supported by your cURL library
<EOF>
Actual result:
--------------
bool(false)
<EOF>
--
Edit bug report at https://bugs.php.net/bug.php?id=66831&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66831&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66831&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66831&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66831&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66831&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66831&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66831&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66831&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66831&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66831&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66831&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66831&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66831&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66831&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66831&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66831&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66831&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66831&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66831&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66831&r=mysqlcfg