Skip to content

Commit

Permalink
Revert "merged branch povilas/issue_6101 (PR #6708)"
Browse files Browse the repository at this point in the history
This reverts commit b2bcbbbd19efdb6e4f2133dfbdf162c9bb30a214, reversing
changes made to c5fcf0d0cc6a3353ec13e2141411e082693db2d5.
  • Loading branch information
fabpot committed Feb 11, 2013
1 parent 795e8eb commit dc38985
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions BinaryFileResponse.php
Expand Up @@ -22,7 +22,6 @@
* @author Igor Wiedler <igor@wiedler.ch>
* @author Jordan Alliot <jordan.alliot@gmail.com>
* @author Sergey Linnik <linniksa@gmail.com>
* @author Povilas Skruibis <puovils@gmail.com>
*/
class BinaryFileResponse extends Response
{
Expand Down Expand Up @@ -124,23 +123,11 @@ public function setAutoLastModified()
*/
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.
*
Expand Down

0 comments on commit dc38985

Please sign in to comment.