Skip to content
Browse files

Bug #14164 Content-range calculation is wrong.

  • Loading branch information...
1 parent 2381161 commit 6cd2815a4132e83eb61e98d34ed7a5a75d649cb0 @CloCkWeRX CloCkWeRX committed Dec 10, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 HTTP/WebDAV/Client/Stream.php
View
4 HTTP/WebDAV/Client/Stream.php
@@ -313,7 +313,7 @@ function stream_write($buffer)
{
// do some math
$start = $this->position;
- $end = $this->position + strlen($buffer);
+ $end = $this->position + strlen($buffer) - 1;
// create a partial PUT request
$req = &$this->_startRequest(HTTP_REQUEST_METHOD_PUT);
@@ -335,7 +335,7 @@ function stream_write($buffer)
case 201:
case 204:
$this->position += strlen($buffer);
- return $end - $start;
+ return 1 + $end - $start;
default:
return false;

0 comments on commit 6cd2815

Please sign in to comment.
Something went wrong with that request. Please try again.