response body modifications - right place?

Fred Clift fred at clift.org
Tue Jun 19 19:27:35 CEST 2012


I'm pretty sure based on my perusal of both the code and documentation
(and mailing list archives) that Varnish currently has no provisions
to inspect/modify response body data, right?

If I were interested in doing some kind of modification/inspection of
the response body, am I correct in assuming that i'd need to put a
hook in at about line 776 of cache_center.c? This is right after the
fetched content has been conditionally gunzipped.

I've read that the 'varnish way' of doing stuff like this would be to
modify the request (e.g. via header, or by munging the request URL)
and then have the back end make customized/inspected content for me.
Unfortunately, i dont have this luxury as I can't make (very much)
change to the back end servers or content-generation.

Are there any plans to put some content hooks in either the deliver or
fetch phases?  Ideally I'd like to have the opportunity to modify the
response body just before an item is stuffed into the cache.  Either
in inline C/vcl or in a vmod.


Thanks.

Fred Clift



More information about the varnish-misc mailing list