Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created May 30, 2012 13:34
Show Gist options
  • Save cosimo/2836353 to your computer and use it in GitHub Desktop.
Save cosimo/2836353 to your computer and use it in GitHub Desktop.
Attempt to transpose libvmod-shield to varnish 2.1
include "/etc/varnish/reset-connection.vcl";
backend default {
.host = "127.0.0.1";
.port = "8080";
}
sub vcl_recv {
if (req.http.CloseMe) {
C{
vcl_reset_connection(sp);
}C
}
}
# Taken straight from libvmod-shield
C{
void vcl_reset_connection(struct sess *sp) {
if (sp->fd < 0)
return;
/* TBC */
return;
}
}C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment