Altering response based on content-type

Trond Michelsen trondmm-varnish at crusaders.no
Mon Sep 25 09:59:16 CEST 2006


Hi.

I'm using Varnish as a cache for a WMS service, and this service will
occasionally time out on a request. If it does it will return either
an image with an error message, or an XML-file with the
error-message. Unfortunately, both responses return the status code
200 OK.

The webclient doesn't handle the XML-response very well, and I don't
want Varnish to cache the images containing error messages.

So - is it possible to get Varnish to return a default image if the
response from the server is an XML-file?

-- 
Trond Michelsen




More information about the varnish-misc mailing list