File tree 1 file changed +1
-14
lines changed
src/Symfony/Component/HttpFoundation
1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 22
22
* @author Igor Wiedler <igor@wiedler.ch>
23
23
* @author Jordan Alliot <jordan.alliot@gmail.com>
24
24
* @author Sergey Linnik <linniksa@gmail.com>
25
- * @author Povilas Skruibis <puovils@gmail.com>
26
25
*/
27
26
class BinaryFileResponse extends Response
28
27
{
@@ -124,23 +123,11 @@ public function setAutoLastModified()
124
123
*/
125
124
public function setAutoEtag ()
126
125
{
127
- $ this ->setEtag ($ this -> calculateFileHash ($ this ->file ->getPathname ()));
126
+ $ this ->setEtag (sha1_file ($ this ->file ->getPathname ()));
128
127
129
128
return $ this ;
130
129
}
131
130
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
-
144
131
/**
145
132
* Sets the Content-Disposition header with the given filename.
146
133
*
You can’t perform that action at this time.
0 commit comments