|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54938 HTTP context with POST method should return response body
Submitted: 2011-05-27 11:23 UTC Modified: 2011-05-27 15:16 UTC
From: simast at gmail dot com Assigned:
Status: Not a bug Package: Streams related
PHP Version: 5.3.6 OS: Linux/Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: simast at gmail dot com
New email:
PHP Version: OS:


 [2011-05-27 11:23 UTC] simast at gmail dot com
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).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-27 12:06 UTC]
-Status: Open +Status: Feedback
 [2011-05-27 12:06 UTC]
Are you sure your server response with some content? This works fine:

$opts = array(
    'method'=>'POST'  )

$context = stream_context_create($opts);
$fp = fopen('', 'r', false, $context);
echo stream_get_contents($fp);
 [2011-05-27 12:12 UTC] simast at gmail dot com
-Status: Feedback +Status: Open
 [2011-05-27 12:12 UTC] simast at gmail dot com
My bad - content is only returned on 200 OK response code. So this bug is related 
to And once that is sorted - this should 
work too.
 [2011-05-27 15:16 UTC]
-Status: Open +Status: Bogus
 [2011-05-27 15:16 UTC]
closing this one then.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 04:01:32 2024 UTC