minor #23835 [HttpFoundation] Remove length limit on ETag (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Remove length limit on ETag
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/23766#discussion_r132072842
| License | MIT
| Doc PR | -
Commits
-------
e6406d21cd
[HttpFoundation] Remove length limit on ETag
This commit is contained in:
commit
84fb318d54
@ -141,7 +141,7 @@ class BinaryFileResponse extends Response
|
||||
*/
|
||||
public function setAutoEtag()
|
||||
{
|
||||
$this->setEtag(substr(base64_encode(hash_file('sha256', $this->file->getPathname(), true)), 0, 32));
|
||||
$this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true)));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user