Skip to content
Permalink
Browse files

Correct off by one error.

Refs #3914
  • Loading branch information...
markstory committed Jul 16, 2013
1 parent 8d542e0 commit 4d6258adeb4366a337efc12f2c0f14d64a02bb3b
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/Cake/Network/CakeResponse.php
  2. +1 −1 lib/Cake/Test/Case/Network/CakeResponseTest.php
@@ -1350,7 +1350,7 @@ protected function _sendFile($file, $range) {
break;
}
if ($end && $offset + $bufferSize >= $end) {
$bufferSize = $end - $offset;
$bufferSize = $end - $offset + 1;
}
echo fread($file->handle, $bufferSize);
if (!$compress) {
@@ -1437,7 +1437,7 @@ public function testFileRange() {
$result = $response->send();
$output = ob_get_clean();
$this->assertEquals(206, $response->statusCode());
$this->assertEquals("is the test asset", $output);
$this->assertEquals("is the test asset ", $output);
$this->assertTrue($result !== false);
}

0 comments on commit 4d6258a

Please sign in to comment.
You can’t perform that action at this time.