httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <>
Subject Re: Caching the useful headers
Date Fri, 08 Feb 2008 22:56:44 GMT

On 02/08/2008 06:26 PM, Dirk-Willem van Gulik wrote:
> Right now we have a nice utility function:
>     ap_cache_cacheable_hdrs_out()
>         Make a copy of the headers, and remove from
>         the copy any hop-by-hop headers, as defined in Section
>         13.5.1 of RFC 2616
> (in cache_util.c, part of mod_cache.h public headers) which we can apply
> to both the in and outbound headers.
> Now as far as I can see -every- caching module will have to take care of
> the error headers and the content -- and filtering both in-and-out that
> way.
> So how about changing this to:
> -    ap_cache_cacheable_hdrs_out(r);
>         calls ap_cache_cacheable_hdrs
>     AND
>         Set Content-Type if not set
>     AND
>         overlays r->err_headers_out
> -    ap_cache_cacheable_hdrs_in(r);
>         calles ap_cache_cacheable_hdrs
> -    ap_cache_cacheable_hdrs(pool, headers, server) (private)
>         delete/cleanse as per RFC 2616
>     and as per CacheIgnoreHeaders
> Or is there a fundamental reason as to why some caches will not want to
> do the 'usual'* ?

There is a slightly different usage of ap_cache_cacheable_hdrs_out in
mod_cache itself. So I would prefer:

1. Rename ap_cache_cacheable_hdrs_out to ap_cache_cacheable_hdrs and keep it public.
2. Create ap_cache_cacheable_hdrs_out / ap_cache_cacheable_hdrs_in as proposed by you
   and add them to the API.

I think we can only do this change on trunk as it would require a major bump.
Ok, formally mod_cache.h is not public, but I agree with your proposal that it *should*
be public and so we should not rename ap_cache_cacheable_hdrs_out to ap_cache_cacheable_hdrs
without a major bump IMHO.



View raw message