Project

General

Profile

Actions

Bug #1585

closed

mod_compress will append etags header even if etags is disabled

Added by georgexsh about 16 years ago. Updated 3 months ago.

Status:
Fixed
Priority:
Normal
Category:
mod_compress
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

When use static-file.etags="disable" to disable etags header in config file, response that encoded by mod_compress still append etags header.


385            buffer_append_string_buffer(p->ofn, sce->etag);

It is seems that mod_compress will not check the options of etags.


Files

mod_compress.c.diff (600 Bytes) mod_compress.c.diff I add some hacks to deal with "static-file.etags" option. georgexsh, 2008-03-09 09:21
mod_compress_1.4.18_patched.c (18 KB) mod_compress_1.4.18_patched.c patched file georgexsh, 2008-03-09 09:23
Actions #1

Updated by georgexsh about 16 years ago


672   etag_mutate(con->physical.etag, sce->etag);
673   response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
Actions #2

Updated by stbuehler over 15 years ago

  • Status changed from New to Fixed
  • Resolution set to invalid

Why would you disable etags if you need mod_compress? And i don't like hacks :)

And why should static-file.etags influence mod_compress?

Actions #3

Updated by stbuehler over 15 years ago

  • Status changed from Fixed to Invalid
Actions #4

Updated by petitchevalroux over 15 years ago

@stbuehler he wants to disable etags for the same reason the static-file.etags has been created (http://redmine.lighttpd.net/issues/show/1209).

To resume : In multiple server configuration Etags are not the same for all the webserver. (May be they are with le mod_compress etags generation algorithm, I do not know ...)

"And why should static-file.etags influence mod_compress?"

May be there should be a compress.etags disable options.

Tell me if i am wrong, I just want to have more explanation about why disabling etags in mod_compress looks so crazy ;)

Actions #5

Updated by georgexsh almost 15 years ago

stbuehler wrote:

Why would you disable etags if you need mod_compress? And i don't like hacks :)

And why should static-file.etags influence mod_compress?

@stbuehler why you think disable etags for mod_compress is a bad idea? could you explain more on it
Although let static-file.etags disable etags for mod_compres is not as nice as add a new config options to control it, but I don't think disabling etags in mod_compress sounds wired.

Actions #6

Updated by kees almost 15 years ago

stbuehler wrote:

Why would you disable etags if you need mod_compress? And i don't like hacks :)

And why should static-file.etags influence mod_compress?

To the first; to save bandwidth; In a multiple server farm etags don't do much good, and they are kinda redundant if you use mtime/size only. So to save bandwidth, i disable them. See also http://developer.yahoo.com/performance/rules.html#etags

We also use mod_compress to lower our bandwidth even more, however i'm getting a bit sick of having to comment out the ETag line and recompile lighty with that single change for every upgrade i do.

So it should either be influenced by static-file.etags, or another setting, which would do exactly the same, but takes up more configuration file space. I for one cannot believe it if someone would want to disable static-file etags, but wouldn't mind if mod_compress overrules their 'no-etag' decision and adds ETags without bothering to look at any relevant config options.

Actions #7

Updated by peto over 14 years ago

Why did you close this bug and ask for feedback at the same time? That's basically spitting in the reporter's face. "I'm pretending to ask for more info, but I don't actually care so I'm closing the bug now."

This is definitely a bug. It makes no sense that you can disable it for static files, but not for compressed files. The ETag setting should be a global setting (etag.enable) which affects everywhere lighttpd adds the header.

Actions #8

Updated by anto over 14 years ago

I also think that this is definitely a bug as the logic is quite simple. The output of mod_compress is a static file, so why can it not accept static-file.etags="disable"?

I also don't really understand why its status is set to "invalid", because I think the propose fix seems to be good enough. Perhaps because the word "hacks" is being used instead of "fix" :)

To work around this problem, I applied the "real hacks" using mod_magnet with LUA script, and also forced my backend to gzip the files.

Actions #9

Updated by rodivi about 14 years ago

I have the same problem here. We need to deactivate eTags on http headers but using zip compression for static files. It would be great if this bug (thats - a - bug) get resolved.

Actions #10

Updated by davidhope over 13 years ago

  • Status changed from Invalid to Reopened

Is there any information we can provide to progress this bug? A few people have responded since it was initially marked as invalid. If it's not valid, or is a 'Wont Fix' can someone explain why?

Thanks

Actions #11

Updated by gstrauss about 8 years ago

This is a very old ticket and yet is marked High Priority.

Without wading into the arguments, I'd like to provide a workaround. You can disable etag generation in both mod_staticfile and in mod_compress by setting in lighttpd.conf:

etag.use-inode = "disabled" 
etag.use-mtime = "disabled" 
etag.use-size  = "disabled" 

Actions #12

Updated by stbuehler about 8 years ago

  • Description updated (diff)
  • Status changed from Reopened to Wontfix
  • Priority changed from High to Normal
  • Target version set to 1.4.x

Unless someone provides a clean patch (moving the option into the "global" config, where the etag flags already are, with a new name and the old name for backward compat) there is nothing to do here, given that the workaround provided by gstrauss should be good enough.

Actions #13

Updated by stbuehler over 7 years ago

  • Target version deleted (1.4.x)
Actions #14

Updated by gstrauss 3 months ago

  • Status changed from Wontfix to Fixed
  • ASK QUESTIONS IN Forums set to No

Fixed in mod_deflate in lighttpd 1.4.42.
mod_deflate modifies the ETag only if ETag is already set in the response headers.

Actions

Also available in: Atom