Edit report at http://bugs.php.net/bug.php?id=52202&edit=1
ID: 52202
User updated by: uramihsayibok at gmail dot com
Reported by: uramihsayibok at gmail dot com
Summary: CURL(OPT|INFO)_PRIVATE
Status: Open
Type: Bug
Package: cURL related
Operating System: Win 7 x64
-PHP Version: 5.3.2
+PHP Version: 5.3.2, libcurl 7.20.0
New Comment:
...and doesn't work with 7.19.7 (Ubuntu, PHP 5.3.2)...
Previous Comments:
------------------------------------------------------------------------
[2010-07-22 22:38:24] nefthy-php dot net at nefthy dot de
It works fine on Debian with php 5.2.6 and libcurl 7.18.2
------------------------------------------------------------------------
[2010-07-22 22:35:04] nefthy-php dot net at nefthy dot de
I can confirm this on Gentoo Linux, same PHP version. In the source code
it gets the same treatment as CURL*_URL, so it could be a libcurl
problem...
------------------------------------------------------------------------
[2010-06-29 11:02:42] uramihsayibok at gmail dot com
Description:
------------
(Background: curl_easy_setopt(3) supports a CURLOPT_PRIVATE that takes a
char* and does nothing with it. It can then be retrieved with
curl_easy_getinfo(3) and CURLINFO_PRIVATE -- cURL >=7.10.3)
While the two CURL*_PRIVATE constants aren't mentioned in any detail in
the PHP manual, they are listed in cURL's predefined constants page, and
using (eg) an array for the value results in an array->string conversion
warning, so I guess there's at least a little bit of support somewhere.
However using them gives buggy results - mostly binary junk.
Test script:
---------------
$curl = curl_init("http://www.example.com");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_PRIVATE, "123"); // *
curl_exec($curl);
var_dump(curl_getinfo($curl, CURLINFO_PRIVATE));
// * mostly happens with numbers; try different string lengths
Expected result:
----------------
string(3) "123"
Actual result:
--------------
string([varies]) "[binary junk]"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52202&edit=1