Edit report at https://bugs.php.net/bug.php?id=60465&edit=1

 ID:                 60465
 Updated by:         larue...@php.net
 Reported by:        dbc334 at gmail dot com
 Summary:            file_get_contents doesn't stop retrieving data
 Status:             Analyzed
 Type:               Bug
 Package:            HTTP related
 Operating System:   Windows
 PHP Version:        5.3.8
-Assigned To:        
+Assigned To:        rasmus
 Block user comment: N
 Private report:     N

 New Comment:

Rasmus, plz look at this one, thanks


Previous Comments:
------------------------------------------------------------------------
[2011-12-13 04:14:48] larue...@php.net

it seems improper to use php_steam_eof while parsing header in 
php_stream_url_wrap_http_ex.

------------------------------------------------------------------------
[2011-12-08 00:22:33] dbc334 at gmail dot com

Description:
------------
When I send request to script connection_close.php from web browser (Internet 
Explorer, Firefox or Opera), it returns only "1". connection_close.php is run 
on Apache 2.2 web server.

But when I execute this script from other php file via file_get_contents (eg. 
do_request.php), it returns "12".

Test script:
---------------
file connection_close.php:
<?php
ob_start();
print '1';
header("Connection: close");
header("Content-Length: 1");
ob_end_flush();
flush();

sleep(2);
print '2';
?>

file do_request.php:
<?php
print file_get_contents("http://web_server_path/connection_close.php";);
?>

Expected result:
----------------
Executing do_request.php should return "1".

Actual result:
--------------
do_request.php returns "12".


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60465&edit=1

Reply via email to