Skip to content

Commit 84fb318

Browse files
committed
minor symfony#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 | symfony#23766 (comment) | License | MIT | Doc PR | - Commits ------- e6406d2 [HttpFoundation] Remove length limit on ETag
2 parents fd16993 + e6406d2 commit 84fb318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/BinaryFileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function setAutoLastModified()
141141
*/
142142
public function setAutoEtag()
143143
{
144-
$this->setEtag(substr(base64_encode(hash_file('sha256', $this->file->getPathname(), true)), 0, 32));
144+
$this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true)));
145145

146146
return $this;
147147
}

0 commit comments

Comments
 (0)