httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Corcoran" <>
Subject Add ETag to ap_scan_script_header_err_core()
Date Tue, 21 Sep 2004 22:48:34 GMT

I've been trying to find a solution to a problem that mod_cache has with
handling Etag's properly.  I'm working with Apache 2.0.51.  Below is a
diff to ./server/util_script.c that seems to fix the problem...

>       else if (!strcasecmp(w, "ETag")) {
>             apr_table_set(r->headers_out, w, l);
>       }

My concern is that this might have some other negative effect on
something.  Does anyone see any problem with adding Etag handling to the
ap_scan_script_header_err_core() function?

The reasoning here is that mod_cache calls this function to populate the
r->headers_out table from the ".header" file in the cache.  But the
function sticks the Etag value in the r->err_headers_out table.  Then,
mod_cache later calls ap_meets_conditions() which expects to find an
Etag value in r->headers_out.

The above diff seems to be the cleanest way to solve the problem, but I
wanted to check and see if it causes any other problems.

Mike C.

View raw message