r2907 - trunk/varnish-cache/bin/varnishtest

phk at projects.linpro.no phk at projects.linpro.no
Wed Jul 9 10:14:25 CEST 2008


Author: phk
Date: 2008-07-09 10:14:25 +0200 (Wed, 09 Jul 2008)
New Revision: 2907

Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_http.c
Log:
Allow modification of the receive timeout



Modified: trunk/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_http.c	2008-07-08 10:29:07 UTC (rev 2906)
+++ trunk/varnish-cache/bin/varnishtest/vtc_http.c	2008-07-09 08:14:25 UTC (rev 2907)
@@ -576,12 +576,28 @@
 	http_write(hp, 4, "chunked");
 }
 
+/**********************************************************************
+ * set the timeout
+ */
 
+static void
+cmd_http_timeout(CMD_ARGS)
+{
+	struct http *hp;
+
+	(void)cmd;
+	CAST_OBJ_NOTNULL(hp, priv, HTTP_MAGIC);
+	AN(av[1]);
+	AZ(av[2]);
+	hp->timeout = strtof(av[1], NULL) * 1000.0;
+}
+
 /**********************************************************************
  * Execute HTTP specifications
  */
 
 static struct cmds http_cmds[] = {
+	{ "timeout",	cmd_http_timeout },
 	{ "txreq",	cmd_http_txreq },
 	{ "rxreq",	cmd_http_rxreq },
 	{ "txresp",	cmd_http_txresp },




More information about the varnish-commit mailing list