|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #66831 curl_opt does not give any warning if CURLOPT_COOKIE* are not supported by cURL
Submitted: 2014-03-06 07:38 UTC Modified: 2014-04-25 09:26 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: Assigned:
Status: Open Package: cURL related
PHP Version: Irrelevant OS: FreeBSD
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-03-06 07:38 UTC]
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:
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIE, "QQQ=12345"));

Expected result:
Warning: option XXX is not supported by your cURL library

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-25 09:26 UTC]
-Type: Bug +Type: Feature/Change Request
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 07:01:28 2024 UTC