Doc #52201 [NEW]: Missing: getting request headers; certinfo

From: Date: Tue, 29 Jun 2010 07:27:39 +0000
Subject: Doc #52201 [NEW]: Missing: getting request headers; certinfo
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4609@lists.php.net to get a copy of this message
From: Operating system: Windows PHP version: 5.3.2 Package: cURL related Bug Type: Documentation Problem Bug description:Missing: getting request headers; certinfo Description: ------------ A couple things missing from the documentation on curl_getinfo: 1. (as mentioned in the comment http://php.net/function.curl-getinfo#83898) To be able to use $opt=CURLINFO_HEADER_OUT you have to had curl_setopt'd CURLINFO_HEADER_OUT=true first. 2. On that subject, If that option is set then (and only then) the associative array returned ($opt=0) will include a request_header item. 3. Also regarding that array, It includes an unmentioned "certinfo" subarray. I'm not sure what this is for. Test script: --------------- $curl = curl_init("https://www.google.com"); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // if needed curl_exec($curl); print_r(curl_getinfo($curl)); // with certinfo, without request_header curl_setopt($curl, CURLINFO_HEADER_OUT, true); curl_exec($curl); print_r(curl_getinfo($curl)); // with certinfo, with request_header Expected result: ---------------- Tomorrow's lottery numbers Actual result: -------------- Array ( ... [certinfo] => Array ( ) ) Array ( ... [certinfo] => Array ( ) [request_header] => GET / HTTP/1.1 Host: www.google.com Accept: */* ) -- Edit bug report at http://bugs.php.net/bug.php?id=52201&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52201&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52201&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52201&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52201&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52201&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52201&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52201&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52201&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52201&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52201&r=support Expected behavior: http://bugs.php.net/fix.php?id=52201&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52201&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52201&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52201&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52201&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52201&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52201&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52201&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52201&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52201&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52201&r=mysqlcfg

« previous php.doc.bugs (#4609) next »