diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index 9f5bb21971..cb6c8a1e8a 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -22,7 +22,6 @@ use Symfony\Component\HttpFoundation\File\Exception\FileException; * @author Igor Wiedler * @author Jordan Alliot * @author Sergey Linnik - * @author Povilas Skruibis */ class BinaryFileResponse extends Response { @@ -124,23 +123,11 @@ class BinaryFileResponse extends Response */ public function setAutoEtag() { - $this->setEtag($this->calculateFileHash($this->file->getPathname())); + $this->setEtag(sha1_file($this->file->getPathname())); return $this; } - /** - * Calculate file hash - * - * @param string $filename The path to the file - * - * @return string - */ - protected function calculateFileHash($filename) - { - return sha1_file($filename); - } - /** * Sets the Content-Disposition header with the given filename. *