"Poul-Henning Kamp" <[EMAIL PROTECTED]> writes:
> "Michael S. Fischer" <[EMAIL PROTECTED]> writes:
> > So does Varnish close HTTP Keep-Alive backend connections after an
> > idle period?  or not?
> We _never_ close a backend connection until the backend closed its
> end.

OK, my mistake.  I thought we did, because I've rarely seen a backend
connection that lasted longer than a request or two.  This is probably a
backend issue.

BTW, this gives me the idea that VCL should support a "vcl_start" (or
perhaps "vcl_use") function that is run only once, when you vcl.use this
particular VCL script; and that it should support setting any run-time
parameter (or at least those that don't require a restart).  Thus, when
you switch from your standard config to your emergency config, there is
no need to manually change timeouts or other parameters.

While we're all gathered around the wishing well, I wish "remove" was
named "unset" (see attached patch) and "unset" on a run-time parameter
should reset it to its default value.

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no

Index: lib/libvcl/vcc_action.c
===================================================================
--- lib/libvcl/vcc_action.c	(revision 2606)
+++ lib/libvcl/vcc_action.c	(working copy)
@@ -276,7 +276,7 @@
 /*--------------------------------------------------------------------*/
 
 static void
-parse_remove(struct tokenlist *tl)
+parse_unset(struct tokenlist *tl)
 {
 	struct var *vp;
 
@@ -286,7 +286,7 @@
 	ERRCHK(tl);
 	assert(vp != NULL);
 	if (vp->fmt != STRING || vp->hdr == NULL) {
-		vsb_printf(tl->sb, "Only http header lines can be removed.\n");
+		vsb_printf(tl->sb, "Only http header lines can be unset.\n");
 		vcc_ErrWhere(tl, tl->t);
 		return;
 	}
@@ -367,7 +367,8 @@
 #undef VCL_RET_MAC_E
 	{ "call", 	parse_call },
 	{ "set", 	parse_set },
-	{ "remove", 	parse_remove },
+	{ "unset", 	parse_unset },
+	{ "remove", 	parse_unset }, /* backward compatibility */
 	{ "purge_url",	parse_purge_url },
 	{ "purge_hash",	parse_purge_hash },
 	{ "esi",	parse_esi },
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to