Etags served by ms-files.php not specific enough
|Reported by:||xiffy||Owned by:|
Today I was tracking an Etag issue we had where different versions of images uploaded to wordpress had the same etags. I first looked at apache and reconfigured it to serve filesize mtime etags. To no avail.
When investigating further i discovered that uploaded files get an etag from ms-files.php (line 57)
$etag = '"' . md5( $last_modified ) . '"';
which to my humble opinion should be something like:
$etag = '"' . md5( $last_modified . filesize($file)) . '"';
that way, images of different formats, created at upload time, which share the same mtime on a fast machine still get different etags.
Change History (9)
comment:2 @wonderboymusic — 2 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to Future Release
comment:5 follow-up: ↓ 7 @wonderboymusic — 19 months ago
- Milestone changed from Future Release to 3.7