http purging multiple accept-encoding entries

Laurence Rowe l at lrowe.co.uk
Fri Jul 9 13:56:36 CEST 2010


On 9 July 2010 12:01, Chris Hecker <checker at d6.com> wrote:
>
> I'm trying to put varnish in front of mediawiki, but there are a couple
> things going wrong with the purging support built into mediawiki (which
> supposedly supports varnish and squid).
>
> 1.  Mediawiki was sending back an HTTP/1.0 PURGE command, which had no Host:
> header, just the full url after the PURGE, so the hash function wasn't
> matching with the normal HTTP/1.1 requests.  I patched mediawiki to fix this
> and send an HTTP/1.1 PURGE with a Host: header, not sure what a better way
> to do this would be.
>
> 2.  The PURGE does not have an Accept-encoding: on it, so it doesn't match
> the cached object, which is almost always A-e: gzip.  I hacked a gzip header
> onto the PURGE, but what I really want is to purge all the records
> associated with an URL.  Is there a way to do this?

See: http://varnish-cache.org/wiki/VCLExamplePurging

Using purge("req.url == " req.url); should fix both problems.

Laurence




More information about the varnish-misc mailing list