From f410931dd808cc7054599ba8fcb3d02e55b43584 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 11 Feb 2013 13:46:49 +0100 Subject: [PATCH] Revert "merged branch povilas/issue_6101 (PR #6708)" This reverts commit b2bcbbbd19efdb6e4f2133dfbdf162c9bb30a214, reversing changes made to c5fcf0d0cc6a3353ec13e2141411e082693db2d5. --- .../HttpFoundation/BinaryFileResponse.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) 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. *