From: tobias382 at gmail dot com Operating system: Kubuntu 7.10 PHP version: 5.2.5 PHP Bug Type: HTTP related Bug description: HTTP streams wrapper issue with Content-Type header
Description: ------------ Specifying a Content-type header in a streams operation using the HTTP wrapper causes a file_get_contents operation using that streams context to fail. Not specifying the Content-type header results in a Notice being issued saying that application/x-www-form-urlencoded is assumed and the script then works as expected. Reproduce code: --------------- http://paste2.org/p/18455 Expected result: ---------------- Should send a URL in the following format to stdout, where # is a number. http://paste2.org/p/# Actual result: -------------- Warning: file_get_contents(http://paste2.org/new-paste): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/matt/pastebin.php on line 21 -- Edit bug report at http://bugs.php.net/?id=44603&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44603&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44603&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44603&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44603&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44603&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44603&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44603&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44603&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44603&r=support Expected behavior: http://bugs.php.net/fix.php?id=44603&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44603&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44603&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44603&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44603&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44603&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44603&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44603&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44603&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44603&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44603&r=mysqlcfg