php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24028 Reading raw post message by php://input
Submitted: 2003-06-04 22:24 UTC Modified: 2006-03-31 01:37 UTC
From: florianophoneltd at yahoo dot com Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 4.3.2 OS: win32 only
Private report: No CVE-ID:
 [2003-06-04 22:24 UTC] florianophoneltd at yahoo dot com
I wrote a routine "postrawdata.php" for displaying HTTP raw request message. 
<?php 
$putdata = fopen( "php://input" , "rb" ); 
while(!feof( $putdata )) 
echo fread($putdata, 4096 ); 
fclose($putdata); 
?> 

It works properly when using a socket program to post something to it. 

But submitting from a simple HTML below will make it dead, even http headers were not sent back, the behavior of brwoser is just waiting before timeout, I have tested it under IE 6.0 and Netscape 7.0 , any suggestion is appreciate. 

<body> 
<form name="form1" method="post" action="postrawdata.php"> 
<input type="text" name="name" > 
<input type="submit" name="Submit" value="Submit"> 
</form> 
</body> 

I think PHP does not send correct responding data to browser, or it does not disconnect the HTTP channel, that makes browsers to wait , whereas my socket client do disconnect when finished.

Thanks,

William Hong

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-24 12:58 UTC] sniper@php.net
Fixed -> closed. 
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC