Skip to content

Commit f410931

Browse files
committedFeb 11, 2013
Revert "merged branch povilas/issue_6101 (PR symfony#6708)"
This reverts commit b2bcbbb, reversing changes made to c5fcf0d.
1 parent 95ba944 commit f410931

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed
 

‎src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

+1-14
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* @author Igor Wiedler <igor@wiedler.ch>
2323
* @author Jordan Alliot <jordan.alliot@gmail.com>
2424
* @author Sergey Linnik <linniksa@gmail.com>
25-
* @author Povilas Skruibis <puovils@gmail.com>
2625
*/
2726
class BinaryFileResponse extends Response
2827
{
@@ -124,23 +123,11 @@ public function setAutoLastModified()
124123
*/
125124
public function setAutoEtag()
126125
{
127-
$this->setEtag($this->calculateFileHash($this->file->getPathname()));
126+
$this->setEtag(sha1_file($this->file->getPathname()));
128127

129128
return $this;
130129
}
131130

132-
/**
133-
* Calculate file hash
134-
*
135-
* @param string $filename The path to the file
136-
*
137-
* @return string
138-
*/
139-
protected function calculateFileHash($filename)
140-
{
141-
return sha1_file($filename);
142-
}
143-
144131
/**
145132
* Sets the Content-Disposition header with the given filename.
146133
*

0 commit comments

Comments
 (0)
Please sign in to comment.