]> err.no Git - varnish/commitdiff
Allow modification of the receive timeout
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 9 Jul 2008 08:14:25 +0000 (08:14 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 9 Jul 2008 08:14:25 +0000 (08:14 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2907 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/vtc_http.c

index 4d49bddb61edcd031b0194683aed357375101804..1514738391090d6309a02708d0d9e246d114377d 100644 (file)
@@ -576,12 +576,28 @@ cmd_http_chunked(CMD_ARGS)
        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 },