New challenge for Varnish!
zabrane Mikael
zabrane3 at gmail.com
Thu Jul 8 07:37:19 CEST 2010
Hi List,
Yesterday with Varnish users help (thanks again guys), I succeeded with an
extreme simplicity to solve the problem I described here:
http://lists.varnish-cache.org/pipermail/varnish-misc/2010-July/004428.html
Today, I've a new challenge for Varnish to extend the capabilties of my
customserver !!!
My current "customserver.vcl" contains 2 backends:
backend squid {
.host = "127.0.0.1";
.port = "3128";
}
backend customserver {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
// set default backend
set req.backend = squid;
if (req.http.X-RAWDATA != "") {
set req.backend = customserver;
}
}
Challenge:
1. If an HTTP request arrives with a special header "X-STORE-IN-FILE: UUID",
I'd like Varnish to get the response data from "squid" backend, save the
"raw HTTP response" on disk under filename "UUID" before sending it back to
the client.
2. If (1) is doable, I'd like Varnish to save both "raw HTTP request and
response" (by "raw", I mean HTTP hearders and payload) in the file "UUID".
Any pointer, hint, or piece of VCL will be very welcome!
Thanks in advance.
NOTE: UUID is a Universally Unique Identifier used in my context to have
unique filenames on disk.
--
Regards
Zab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100708/4e18b5b5/attachment-0003.html>
More information about the varnish-misc
mailing list