php.net |  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
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: lytboris@php.net Assigned:
Status: Open Package: cURL related
PHP Version: Irrelevant OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
1 + 23 = ?
Subscribe to this entry?

 
 [2014-03-06 07:38 UTC] lytboris@php.net
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>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-25 09:26 UTC] mike@php.net
-Type: Bug +Type: Feature/Change Request
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC