php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30028 stream_get_contents() doesn't respect the $maxlength
Submitted: 2004-09-08 18:25 UTC Modified: 2004-09-09 12:54 UTC
From: nlopess@php.net Assigned:
Status: Closed Package: Network related
PHP Version: 5CVS-2004-09-08 (dev) OS: n/a
Private report: No CVE-ID: None
 [2004-09-08 18:25 UTC] nlopess@php.net
Description:
------------
It seems that stream_get_contents() isn't respecting the second paramether, limit.
I think this only happen for http wrappers.

Reproduce code:
---------------
<?
$fp = fopen('http://www.php.net/', 'r');

echo strlen(stream_get_contents($fp, 50));

fclose($fp);

?>

Expected result:
----------------
50

Actual result:
--------------
30094

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-09 12:54 UTC] nlopess@php.net
Fixed by Sara.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 17:01:30 2024 UTC