Bug 55573

Summary: FileETag needs MTimeSeconds, MTime with granularity of 1 second
Product: Apache httpd-2 Reporter: Alain Williams <addw>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P2    
Version: 2.4.6   
Target Milestone: ---   
Hardware: All   
OS: Linux   

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"
https://lists.w3.org/Archives/Public/ietf-http-wg/2020JulSep/0041.html

Please leave your thoughts and opinions in that discussion.