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

Bug #6407 stream_read(): Range one byte too long
Submitted: 2006-01-03 17:16 UTC
From: knight_k at gmx dot de Assigned: hholzgra
Status: Closed Package: HTTP_WebDAV_Client
PHP Version: Irrelevant OS: WinXP
Roadmaps: (Not assigned)    
Subscription  


 [2006-01-03 17:16 UTC] knight_k at gmx dot de
Description: ------------ Php gives a warning (see below), that one byte too much is read (which actually is, i think) That's because of the following lines in stream_read($count): $end = $start+$count; [...] $req->addHeader("Range", "bytes=$start-$end"); because of "Range" including the $start-offset, it is one byte too long, so it should be $end = $start+$count-1; to fix this. Test script: --------------- require_once('HTTP/WebDAV/Client.php'); copy("webdav://webdavserver.net/foo.bar","foo.bar"); Actual result: -------------- the warning: "PHP Warning: copy(): HTTP_WebDAV_Client_Stream::stream_read - read 1 bytes more data than requested (8193 read, 8192 max) - excess data will be lost [...]" and a corrupted file

Comments

 [2006-03-01 15:47 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!