varnish/libvmod-curl — pull request #1 by lampeh (2012-10-15 16:58:22+00:00)
Title: custom request headers

adds vmod functions curl.add_header() and curl.unset_header() to add/remove additional request headers. mostly copied from existing code.

Usage:

sub replay_req {
curl.add_header("X-Replay: yes"); // add custom header
curl.add_header("Host: " + req.http.Host); // copy Host: header from request
curl.add_header("Accept:"); // disable libcurl's Accept: header
curl.fetch("http://127.0.0.1" + req.url);
curl.free();
}