]> err.no Git - varnish/commitdiff
Supply reasonable defaults for error code / reason.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 23 Oct 2007 12:35:29 +0000 (12:35 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 23 Oct 2007 12:35:29 +0000 (12:35 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2161 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c

index a8244a665f80927854457f1b7b0fd48076ff206d..2ae6be78e35ed5681a1e0767b37cb50ea64e08c2 100644 (file)
@@ -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);
 }
 
 /*--------------------------------------------------------------------*/