httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@cnet.com>
Subject Re: 304's and mod-include --PATCH
Date Fri, 14 Sep 2001 19:40:14 GMT
here is a patch which does just that.

Index: mod_include.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/filters/mod_include.c,v
retrieving revision 1.146
diff -u -u -r1.146 mod_include.c
--- mod_include.c       2001/09/10 03:58:26     1.146
+++ mod_include.c       2001/09/14 19:34:17
@@ -3081,6 +3081,13 @@
      * the content-length should just be unset.
      */
     apr_table_unset(f->r->headers_out, "Content-Length");
+    /*
+     * Always unset the ETag/Last-Modified fields.
+     * We don't know if we are going to be modified after we have
+     * sent the headers out.
+     */
+    apr_table_unset(f->r->headers_out, "ETag");
+    apr_table_unset(f->r->headers_out, "Last-Modified");
 
     rv = send_parsed_content(&b, r, f);


--
On Fri, 2001-09-14 at 12:33, Aaron Bannert wrote:
> On Fri, Sep 14, 2001 at 12:16:01PM -0700, Brian Pane wrote:
> > Ian Holsman wrote:
> > 
> > >found something interesting.
> > >
> > >a mod-included page (which by it's nature is dynamic)
> > >is getting 304's returned instead of running the page.
> > >
> > >
> > >I'm just wondering if we should remove the 'Last-Modified' and 'ETag'
> > >fields from the header-out response. (like we do with the
> > >content-length)
> > >
> > I suppose the best way to handle Last-Modified for mod_include would
> > be to use the most recent of all of the timestamps of the included
> > files, and suppress the Last-Modified if any included component is
> > dynamic.  But that might be a lot more trouble than it's worth;
> > simply removing Last-Modified and ETag is much easier.
> 
> It is definately more trouble than it's worth, especially when you take
> into account that when you #include virtual/cgi you can't really determine
> if that page is dynamic or not. IIRC, you can also simply include the
> output from exec'd programs (it's been awhile since I've really used
> includes).
> 
> Probably best to just remove the Last-Modified and ETag headers.
> 
> -aaron
-- 
Ian Holsman          IanH@cnet.com
Performance Measurement & Analysis
CNET Networks   -   (415) 364-8608


Mime
View raw message