Bug 55573 - FileETag needs MTimeSeconds, MTime with granularity of 1 second
Summary: FileETag needs MTimeSeconds, MTime with granularity of 1 second
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.6
Hardware: All Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2013-09-19 21:15 UTC by Alain Williams
Modified: 2020-07-20 11:29 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Alain Williams 2013-09-19 21:15:50 UTC
MTime will generate a time with micosecond accuracy if the file system supports it. This can cause problems of coherence between machines where the copy mechanism is not more accurate than 1 second.

This could be fixed if FileETag had an option MTimeSeconds that produced MTime with a 1 second granularity.

The fix is not hard and would involve a few lines in:

ap_make_etag() in http_etag.c

set_etag_bits() in core.c
Comment 1 Sergey Ponomarev 2020-07-20 11:29:25 UTC
This is quite important issue and the proposed MTimeSeconds must be added because now there is no ability to configure Apache HTTPD to return the same ETag as Nginx.
Also I did a research how other web servers generates ETag and my proposition is to make Apache by default return the same ETag as Nginx i.e. MTimeSeconds-Size.
I asked a question in http-wg to add to spec a recommended way of ETag generation "by default"

Please leave your thoughts and opinions in that discussion.