Feature #507
closedoptional consistent ETag header base on file content instead of only inode
Description
Hello,
I have several webservers with local document roots (stage via rsync)
behind a loadbalancer. There any way to modify the ETag header and delete the inode
information.
Since the inode information is different for each server even while the
file is identical caching is less performant. Furthermore attackers can
guess the number of webservers behind the balancer.
The relating apache directive is:
FileETag MTime Size
I would suggest some similar option for lighttpd.
Regards
Andreas
-- lexx
Updated by Anonymous over 18 years ago
Here is my patch for many servers. It just uses size twice for inodes.
Yet it dosnet remove problem when modification dates differs a little. (You can delete size->mtab, but last-modified will still be bad).
#!patch --- ./src/etag.c.orig 2006-05-24 22:48:05.000000000 +0200 +++ ./src/etag.c 2006-05-24 22:48:44.000000000 +0200 @@ -9,9 +9,7 @@ } int etag_create(buffer *etag, struct stat *st) { - buffer_copy_off_t(etag, st->st_ino); - buffer_append_string_len(etag, CONST_STR_LEN("-")); - buffer_append_off_t(etag, st->st_size); + buffer_copy_off_t(etag, st->st_size); buffer_append_string_len(etag, CONST_STR_LEN("-")); buffer_append_long(etag, st->st_mtime);
-- Marek Pu?czy?ski
Updated by Anonymous over 18 years ago
Looking forward to this new Option...
I have many Servers Running Lighty in a cluster and the etags are different..
Sorta Hurts..
--Running Lightly
Updated by Anonymous about 18 years ago
This would be helpful in my setup also.
I lost this when I move from apache to lighttpd.
(Noone other than me has noticed so far but i'm going to have to explain it to the boss at somepoint)
An I would rather not have to apply a patch to get it working.
Thanks.
-Dan
-- Dan <dmarkham
Updated by Anonymous almost 18 years ago
I have created a patch in ticket 1209 which provides for various options in enabling/disabling different components for etag generation as well as enabling/disabling etag generation globally
http://trac.lighttpd.net/trac/ticket/1209
The options are
etag.use-inode = "enable"|"disable"
etag.use-mtime = "enable"|"disable"
etag.use-size = "enable"|"disable"
static-file.etags = "enable"|"disable"
The patch is relative to 1.4.15. Would appreciate if anyone could test the patch and provide feedback in ticket 1209. Test patch-version4. It contains all the options
Thanks,
-- yusufg
Updated by jan almost 18 years ago
- Status changed from New to Fixed
- Resolution set to duplicate
I'll close this ticket as duplicate af #1209 as the requested changes are applied.
Also available in: Atom