php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62499 curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false
Submitted: 2012-07-07 15:15 UTC Modified: 2012-07-09 02:36 UTC
From: r dot hampartsumyan at gmail dot com Assigned: laruence (profile)
Status: Closed Package: cURL related
PHP Version: 5.3.14 OS: Linux
Private report: No CVE-ID: None
 [2012-07-07 15:15 UTC] r dot hampartsumyan at gmail dot com
Description:
------------
According to the documentation for the 	CURLOPT_COOKIEFILE option: "The name of the file containing the cookie data. The cookie file can be in Netscape format, or just plain HTTP-style headers dumped into a file. If the name is an empty string, no cookies are loaded, but cookie handling is still enabled." . In previous version (e.g. 5.3.13) curl_setopt($ch,CURLOPT_COOKIEFILE, "") returned TRUE, but in 5.3.14 it returns FALSE. It seems like a regression caused by the fix of Bug #61948.

Tested on Debian 7 and Ubuntu 12.04.

Test script:
---------------
<?php
$ch = curl_init("http://php.net");
var_dump(curl_setopt($ch,CURLOPT_COOKIEFILE, ""));

Expected result:
----------------
bool(true)

Actual result:
--------------
bool(false)

Patches

patch_for_bug_62499 (last revision 2012-07-07 18:37 UTC by r dot hampartsumyan at gmail dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-08 17:10 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: laruence
 [2012-07-09 00:34 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log: Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;&quot;) returns false)
 [2012-07-09 00:45 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log: Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;&quot;) returns false)
 [2012-07-09 00:46 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log: Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;&quot;) returns false)
 [2012-07-09 02:36 UTC] laruence@php.net
-Status: Assigned +Status: Closed
 [2012-07-09 02:36 UTC] laruence@php.net
This bug has been fixed in SVN.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2014-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log: Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;&quot;) returns false)
 [2014-10-07 23:34 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=c819cf9d6bd43d79b894f1d0f0c6c282893fd9bd
Log: Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, &quot;&quot;) returns false)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC