From: dhendric at adobe dot com Operating system: Mac OS X Leopard PHP version: 5.2.6 PHP Bug Type: *URL Functions Bug description: Making POST requests do not always return correct Mime Type
Description: ------------ When using the curl class or the HTTP Request class (Pear) that sends a POST request, some instances return the wrong mime type in the header data. Using linux commands POST and wget return correct mime type in header for the same request. curl via Mac OS X command line: deirdra-hendrickss-macbook-pro:~ dhendric$ curl --url "http://s7d4.scene7.com/is/image/sample" -d "fmt=png&req=catalogprops,text" -i HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Last-Modified: Thu, 25 Sep 2008 23:05:41 GMT ETag: "6d16a6640f1e7e88731e9688556b6596" Content-Type: text/plain Content-Length: 466 Expires: Thu, 25 Sep 2008 23:05:43 GMT Date: Thu, 25 Sep 2008 23:05:43 GMT Connection: keep-alive Reproduce code: --------------- $URL = "http://s7d4.scene7.com/is/image/sample?fmt=png&req=catalogprops,text"; $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_POST, true); curl_setopt($c, CURLOPT_URL, $URL); curl_exec($c); echo curl_getinfo($c, CURLINFO_CONTENT_TYPE); curl_close($c); Expected result: ---------------- should echo "text/plain" Actual result: -------------- echos "image/jpeg" -- Edit bug report at http://bugs.php.net/?id=46176&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46176&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46176&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46176&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46176&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46176&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46176&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46176&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46176&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46176&r=support Expected behavior: http://bugs.php.net/fix.php?id=46176&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46176&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46176&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46176&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46176&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46176&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46176&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46176&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46176&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46176&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46176&r=mysqlcfg