r2163 - in branches/1.2: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Oct 23 14:38:20 CEST 2007


Author: des
Date: 2007-10-23 14:38:19 +0200 (Tue, 23 Oct 2007)
New Revision: 2163

Modified:
   branches/1.2/
   branches/1.2/bin/varnishd/cache_fetch.c
   branches/1.2/bin/varnishd/cache_vrt.c
Log:
Merged revisions 2161-2162 via svnmerge from 
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache

........
  r2161 | des | 2007-10-23 14:35:29 +0200 (Tue, 23 Oct 2007) | 2 lines
  
  Supply reasonable defaults for error code / reason.
........
  r2162 | des | 2007-10-23 14:36:34 +0200 (Tue, 23 Oct 2007) | 2 lines
  
  Check for a negative return from HTC_Rx().  Probably needs revisiting.
........



Property changes on: branches/1.2
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2154
   + /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2154,2161-2162

Modified: branches/1.2/bin/varnishd/cache_fetch.c
===================================================================
--- branches/1.2/bin/varnishd/cache_fetch.c	2007-10-23 12:36:34 UTC (rev 2162)
+++ branches/1.2/bin/varnishd/cache_fetch.c	2007-10-23 12:38:19 UTC (rev 2163)
@@ -331,6 +331,13 @@
 		i = HTC_Rx(htc);
 	while (i == 0);
 
+	if (i < 0) {
+		VBE_UpdateHealth(sp, vc, -1);
+		VBE_ClosedFd(sp->wrk, vc);
+		/* XXX: other cleanup ? */
+		return (__LINE__);
+	}
+
 	if (http_DissectResponse(sp->wrk, htc, hp)) {
 		VBE_UpdateHealth(sp, vc, -2);
 		VBE_ClosedFd(sp->wrk, vc);

Modified: branches/1.2/bin/varnishd/cache_vrt.c
===================================================================
--- branches/1.2/bin/varnishd/cache_vrt.c	2007-10-23 12:36:34 UTC (rev 2162)
+++ branches/1.2/bin/varnishd/cache_vrt.c	2007-10-23 12:38:19 UTC (rev 2163)
@@ -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