httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [PATCH] for 1.3: Last-Modified from scripts
Date Mon, 18 Aug 1997 07:04:05 GMT
I tested this and unfortunately because set_last_modified is also where
all the ETag stuff happens this causes an ETag to be added to the output
... and the ETag is bogus in the context of CGIs.

I can't remember if we totally agreed on whether this is a good idea or
not ... but it looks like solving this one also requires solving PR#895
(which says that set_last_modified shouldn't do ETag, there should be a
set_etag). 

Dean

On Thu, 14 Aug 1997, Rodent of Unusual Size wrote:

>     This is for Dean's PR#894.  It allows a "Last-Modified" header field
>     emitted by a script to be used for If-* request header processing
>     (and etag generation, btw).
> 
>     #ken    :-)}
> 
> Index: core/util_script.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/core/util_script.c,v
> retrieving revision 1.69
> diff -u -r1.69 util_script.c
> --- util_script.c	1997/08/05 06:33:26	1.69
> +++ util_script.c	1997/08/14 12:02:01
> @@ -399,6 +399,21 @@
>          else if(!strcasecmp(w,"Transfer-Encoding")) {
>  	    table_set (r->headers_out, w, l);
>          }   
> +/*
> + * If the script gave us a Last-Modified header, run it through the checks
> + * which work against it [done in set_last_modified()].  Any conditional
> + * failures in those will cause us to bail out.  Success means all the
> + * conditions were satisfied and the appropriate response header fields have
> + * been set - so we don't need to do anything else.
> + */
> +        else if (!strcasecmp(w, "Last-Modified")) {
> +	    time_t mtime = parseHTTPdate(l);
> +	    int slm_status = set_last_modified(r, mtime);
> +
> +	    if (slm_status != OK) {
> +		return slm_status;
> +	    }
> +        }   
>  
>  /* The HTTP specification says that it is legal to merge duplicate
>   * headers into one.  Some browsers that support Cookies don't like
> 


Mime
View raw message