Skip to content

Commit 063292d

Browse files
committed
Windows Compatibility: Simplify ETag generation by modifying path sanitization to replace only forward slashes.
1 parent 70a6ee1 commit 063292d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/DevEtagSetter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(
2828
*/
2929
public function __invoke(ResourceObject $ro, int|null $time = null, HttpCache|null $httpCache = null)
3030
{
31-
$ro->headers[Header::ETAG] = sprintf('%s_%s', str_replace([':', DIRECTORY_SEPARATOR], ['_', '_'], $ro->uri->path), http_build_query($ro->uri->query));
31+
$ro->headers[Header::ETAG] = sprintf('%s_%s', str_replace('/', '_', $ro->uri->path), http_build_query($ro->uri->query));
3232
$ro->headers[Header::LAST_MODIFIED] = gmdate(DateTimeInterface::RFC7231, 0);
3333
$this->setCacheDependency($ro);
3434
}

0 commit comments

Comments
 (0)