r2161 - trunk/varnish-cache/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Oct 23 14:35:29 CEST 2007


Author: des
Date: 2007-10-23 14:35:29 +0200 (Tue, 23 Oct 2007)
New Revision: 2161

Modified:
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
Log:
Supply reasonable defaults for error code / reason.


Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-10-23 11:57:16 UTC (rev 2160)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2007-10-23 12:35:29 UTC (rev 2161)
@@ -56,8 +56,8 @@
 
 	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);
 }
 
 /*--------------------------------------------------------------------*/




More information about the varnish-commit mailing list