public function BinaryFileResponse::setAutoEtag

Automatically sets the ETag header according to the checksum of the file.

1 call to BinaryFileResponse::setAutoEtag()
BinaryFileResponse::setFile in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/BinaryFileResponse.php
Sets the file to stream.

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;
}