From: php1 at nmpu dot com Operating system: Windows 2000 + Linux 2.6.24.7 PHP version: 5.2CVS-2008-12-06 (snap) PHP Bug Type: OpenSSL related Bug description: file_get_contents via HTTPS wrapper produces corrupt response from eBay API
Description: ------------ I use file_get_contents with the HTTPS wrapper to post a request to an eBay API server and retrieve the response. Recently, I noticed a response with what appears to be leading and trailing garbage. A similar solution based on cURL produces the expected response (no garbage). The issue was originally discovered on a Linux/Apache box. I downloaded the latest WIN32 PHP/Apache and can still reproduce. Reproduce code: --------------- http://exdwh.com/ebay/bugs/https_wrapper_bug.txt Contact me if you don't have easy access to the necessary eBay authorization tokens. You could sign up at http://developer.ebay.com quicker than sending me an e-mail and waiting for the response. :) Expected result: ---------------- cURL says |<?xml version='1.0' encoding='UTF-8'?><getJobsResponse xmlns:sct="http://www.ebay.com/soaframework/common/types" xmlns="http://www.ebay.com/marketplace/services"><ack>Success</ack><version>1.0.0</version><timestamp>2008-12-06T03:26:32.487Z</timestamp></getJobsResponse>| Actual result: -------------- http wrapper says |10d <?xml version='1.0' encoding='UTF-8'?><getJobsResponse xmlns:sct="http://www.ebay.com/soaframework/common/types" xmlns="http://www.ebay.com/marketplace/services"><ack>Success</ack><version>1.0.0</version><timestamp>2008-12-06T03:26:32.278Z</timestamp></getJobsResponse> 0 | Leading garbage is: 31 30 64 0D 0A Trailing garbage is: 0D 0A 30 0D 0A 0D 0A -- Edit bug report at http://bugs.php.net/?id=46775&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46775&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46775&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46775&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46775&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46775&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46775&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46775&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46775&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46775&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46775&r=support Expected behavior: http://bugs.php.net/fix.php?id=46775&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46775&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46775&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46775&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46775&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46775&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46775&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46775&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46775&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46775&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46775&r=mysqlcfg