From:             
Operating system: Win 7 x64
PHP version:      5.3.2
Package:          cURL related
Bug Type:         Bug
Bug description:CURL(OPT|INFO)_PRIVATE

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 bug report at http://bugs.php.net/bug.php?id=52202&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52202&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52202&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52202&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52202&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52202&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52202&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52202&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52202&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52202&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52202&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52202&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52202&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52202&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52202&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52202&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52202&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52202&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52202&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52202&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52202&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52202&r=mysqlcfg

Reply via email to