#44603 [Opn->Fbk]: HTTP streams wrapper issue with Content-Type header
| From: | jani@php.net | Date: | Wed, 02 Apr 2008 09:28:05 +0000 |
| Subject: | #44603 [Opn->Fbk]: HTTP streams wrapper issue with Content-Type header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-123849@lists.php.net to get a copy of this message | ||
ID: 44603
Updated by: jani@php.net
Reported By: tobias382 at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: HTTP related
Operating System: Kubuntu 7.10
PHP Version: 5.2.5
-Assigned To:
+Assigned To: fb-req-jani
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows (zip):
http://snaps.php.net/win32/php5.2-win32-latest.zip
For Windows (installer):
http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
Previous Comments:
------------------------------------------------------------------------
[2008-04-02 02:38:14] tobias382 at gmail dot com
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 this bug report at http://bugs.php.net/?id=44603&edit=1