Automatically sets the ETag header according to the checksum of the file.
File
- drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php, line 124
Class
- BinaryFileResponse
- BinaryFileResponse represents an HTTP response delivering a file.
Namespace
Symfony\Component\HttpFoundation
Code
public function setAutoEtag() {
$this
->setEtag(sha1_file($this->file
->getPathname()));
return $this;
}