Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.4

Bug #13124 getRanges() too lax
Submitted: 2008-02-15 18:54 UTC
From: jausions Assigned: jausions
Status: Closed Package: HTTP_Download (version CVS)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 + 3 = ?

 
 [2008-02-15 18:54 UTC] jausions (Philippe Jausions)
Description: ------------ "bytes=-" is not a valid Range, but will be accepted. Same for "bytes=12-34 56-78" (missing comma) I tumbled across the problem when dealing with unknown content-length. The corrected function is below, although I'm already working on a separate patch for request #13121. Test script: --------------- function getRanges() { return preg_match('/^bytes=((\d+-|\d+-\d+|-\d+)(, ?(\d+-|\d+-\d+|-\d+))*)$/', @$_SERVER['HTTP_RANGE'], $matches) ? $matches[1] : array(); }

Comments

 [2009-12-14 09:08 UTC] jausions (Philippe Jausions)
-Status: Open +Status: Closed -Assigned To: +Assigned To: jausions
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.