Geoffrey Young <[EMAIL PROTECTED]> writes: > 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.
That can't be what's happening; *without* my module, the request is served with *no* last-modified header and *no* etag header -- because it's a document parsed for SSI, and the default handler therefore doesn't provide those things. *With* my module, it's served with the last-modified date specified in my handler -- *not* the date on the file, for example; and it changes if I change what my module does -- and with an ETAG value that it gets from somewhere. >> 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); This makes no difference, and I can't find any documentation anywhere referring to it; google > and see also the 'FileEtag none' directive > > http://httpd.apache.org/docs/mod/core.html#fileetag Thanks very much, will investigate these. -- David Dyer-Bennet, <mailto:[EMAIL PROTECTED]>, <http://www.dd-b.net/dd-b/> RKBA: <http://noguns-nomoney.com> <http://www.dd-b.net/carry/> Photos: <dd-b.lighthunters.net> Snapshots: <www.dd-b.net/dd-b/SnapshotAlbum/> Dragaera/Steven Brust: <http://dragaera.info/> -- 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