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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lytboris@php.net
New email:
PHP Version: OS:

 

 [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-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 19 01:01:39 2019 UTC