You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dick Snippe <Di...@tech.omroep.nl> on 2005/01/05 13:45:15 UTC

Re: [Patch 30399] New directive CacheIgnoreHeaders to prevent user defined headers from being stored by mod_cache

On Thu, Dec 30, 2004 at 09:23:39PM +0000, Nick Kew wrote:

> On Thu, 30 Dec 2004, Dick Snippe wrote:
> 
> > cachable pages. Prior to apache 2.0.50 this wasn't a very big issue; these
> > pages would be cached, many people would be using the same cookie and that
> > was that. However, after apache-2.0.50 apache would store cookies as well.
> > This resulted in storing multiple cookies for the same web page which
> > confused tomcat to the point of breaking.
> 
> Can you not work around this with your own "Header set" directives to
> override your application's cookies with the proxy's own, or indeed
> unset them?

I tried that once, but I never got it working. Simply unset all "Set-Cookie"
headers doesn't work, because that would also remove them at places where
they're needed (typically for "Cache-Control: private" pages that use
cookies to track login status etc.)
So, I'd need to unset them only for cachable pages.
Using mod_headers I don't see how this could be done.
An environment variable would need to be set. But SetEnvIf can only look at
the request headers; not at the response headers.
Perhaps if SetEnvIf could look at the response headers generated by the
origin server (tomcat in this case) it'd be possible to emulate all the
cachability tests in mod_cache.c But frankly, I'd rather not go there.

> > Fortunately the CacheIgnoreHeaders patch solves exactly this problem for us!
> > We use it in production on rather busy sites and it works perfectly.
> > Since I'd rather use regular apache-2.0.x versions instead of CVS checkouts,
> > I'd like to see this patch backported to 2.0.x, please.
> 
> Nothing against backporting the patch, but I'd need to review it before
> voting +1 (as opposed to +0).

All I can say is that it works perfectly for us.

-- 
Dick Snippe - Publieke Omroep Internet Services
Mediacentrum kamer 138 Sumatralaan 45 Hilversum  \ fight war
tel +31 35 6774252, email beheer@omroep.nl []()   \ not wars

Re: [Patch 30399] New directive CacheIgnoreHeaders to prevent user defined headers from being stored by mod_cache

Posted by r....@t-online.de.
[..cut..]

Hi all,

I recently noticed that we now have two votes (one from Justin and one from Bill, btw: thanks Bill) for backporting the
patch for report 30399 to 2.0.x.
As I and Dick Snippe (see http://mail-archives.apache.org/eyebrowse/ReadMsg?listName=dev@httpd.apache.org&msgNo=97403) 

would like to see this patch backported I am just asking if someone has some time (ok, wrong approach :-)) to have a
look at the patch such that it can possibly receive a third +1. Maybe Nick who responded to Dicks posting or maybe
the person who added a +0 for this patch to the status file?

To ease the work of backporting I just attached a version of the patch against 2.0.53 to the report 30399. 


Thanks and regards
 
     RĂ¼diger