From 24be6a31b51227a1c769cc9d85252725b0c45157 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 23 Oct 2007 12:35:29 +0000 Subject: [PATCH] Supply reasonable defaults for error code / reason. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2161 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index a8244a66..2ae6be78 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -56,8 +56,8 @@ VRT_error(struct sess *sp, unsigned code, const char *reason) CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, reason); - sp->err_code = code; - sp->err_reason = reason; + sp->err_code = code ? code : 503; + sp->err_reason = reason ? reason : http_StatusMessage(sp->err_code); } /*--------------------------------------------------------------------*/ -- 2.39.5