From: phk Date: Mon, 7 Jul 2008 21:06:55 +0000 (+0000) Subject: Testcase for old backend syntax. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db56539768a314a9779157cd33e879243c0513a;p=varnish Testcase for old backend syntax. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2890 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishtest/tests/v00002.vtc b/varnish-cache/bin/varnishtest/tests/v00002.vtc index db1f91c0..8a4cdc56 100644 --- a/varnish-cache/bin/varnishtest/tests/v00002.vtc +++ b/varnish-cache/bin/varnishtest/tests/v00002.vtc @@ -70,7 +70,6 @@ varnish v1 -badvcl { backend b-1 { .host = "127.0.0.2"; } } -# Assign backend by non-C-compat name # Check backend reference by non-C-compat name varnish v1 -badvcl { backend b1 { .host = "127.0.0.2"; } @@ -78,3 +77,11 @@ varnish v1 -badvcl { set req.backend = b-1; } } + +# Old backend syntax + +varnish v1 -badvcl { + backend b1 { + set host = "localhost"; + } +} diff --git a/varnish-cache/lib/libvcl/vcc_backend.c b/varnish-cache/lib/libvcl/vcc_backend.c index 70fba9c5..2a83988a 100644 --- a/varnish-cache/lib/libvcl/vcc_backend.c +++ b/varnish-cache/lib/libvcl/vcc_backend.c @@ -259,7 +259,7 @@ vcc_ParseHostDef(struct tokenlist *tl, int *nbh, const struct token *name, const "Remove \"set\" and \"backend\" in front" " of backend fields.\n" ); vcc_ErrToken(tl, tl->t); - vsb_printf(tl->sb, " at\n"); + vsb_printf(tl->sb, " at "); vcc_ErrWhere(tl, tl->t); return; }