David Dyer-Bennet wrote: > When I call update_mtime I seem to get set_etags done automatically as > well (or perhaps it's set_last_modified that does it?). This is > *BAD*. It's also not documented anywhere I can find online or in > _Writing Apache Modules with Perl and C_. (Apache 1.3.22, mod_perl > 1.26). > > This comes up in the process of trying to create a module to cause > documents using server-side includes to be served with a last-modified > header but no etag header. I'm at the playing stage, and have a tiny > module, configured as a content handler for my particular test file, > which does update_mtime, set_last_modified, and then returns DECLINED > (causing the request to be processed by default handlers). This works > in the sense that my handler is being invoked (I get errors if there > are errors in it :-)) and the file is served; it appears to be doing > roughly what I expect, except... > > I'm getting *both* the mtime I set (either the file mtime if I give no > arg, or the time I give if I give one) in last-modified *and* the > default ETAGS header also, which is bad.
the etag and last-modified headers setting has nothing to do with mod_perl in this case - it's done by default_handler, so if you fallback to default_handler then you get to deal with its logic and results. > > And no documented syntax of set_etag *removes* an etag header, and > undef and 0 haven't given the desired results. > > So, any suggestions? try $r->notes('no-etag' => 1); and see also the 'FileEtag none' directive http://httpd.apache.org/docs/mod/core.html#fileetag HTH --Geoff -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html