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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nlopess@php.net
New email:
PHP Version: OS:

 

 [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: Thu Apr 25 07:01:31 2024 UTC