r336 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Jul 6 10:32:38 CEST 2006


Author: phk
Date: 2006-07-06 10:32:38 +0200 (Thu, 06 Jul 2006)
New Revision: 336

Modified:
   trunk/varnish-cache/bin/varnishd/rfc2616.c
Log:
404 handling


Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/rfc2616.c	2006-07-06 08:07:09 UTC (rev 335)
+++ trunk/varnish-cache/bin/varnishd/rfc2616.c	2006-07-06 08:32:38 UTC (rev 336)
@@ -135,13 +135,13 @@
 	sp->obj->response = http_GetStatus(hp);
 	switch (sp->obj->response) {
 	case 200: /* OK */
-		sp->obj->valid = 1;
-		/* FALLTHROUGH */
 	case 203: /* Non-Authoritative Information */
 	case 300: /* Multiple Choices */
 	case 301: /* Moved Permanently */
 	case 410: /* Gone */
+	case 404: /* Not Found */
 		sp->obj->cacheable = 1;
+		sp->obj->valid = 1;
 		body = 1;
 		break;
 	default:
@@ -157,6 +157,5 @@
 	}
 
 	return (body);
-
 }
 




More information about the varnish-commit mailing list