Bug #54938 [Opn->Fbk]: HTTP context with POST method should return response body
| From: | johannes@php.net | Date: | Fri, 27 May 2011 10:06:40 +0000 |
| Subject: | Bug #54938 [Opn->Fbk]: HTTP context with POST method should return response body | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160995@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54938&edit=1
ID: 54938
Updated by: johannes@php.net
Reported by: simast at gmail dot com
Summary: HTTP context with POST method should return response
body
-Status: Open
+Status: Feedback
Type: Bug
Package: Streams related
Operating System: Linux/Ubuntu
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Are you sure your server response with some content? This works fine:
<?php
$opts = array(
'http'=>array(
'method'=>'POST' )
);
$context = stream_context_create($opts);
$fp = fopen('http://php.net', 'r', false,
$context);
echo stream_get_contents($fp);
?>
Previous Comments:
------------------------------------------------------------------------
[2011-05-27 11:23:08] simast at gmail dot com
Description:
------------
Apparently, having a POST method HTTP context request does not return
response
body back. Tested with stream_get_contents() but I suspect it does
affect other
similar functions as well (file_get_contents/fread).
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54938&edit=1