From: phk Date: Thu, 6 Jul 2006 08:32:38 +0000 (+0000) Subject: 404 handling X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=524c05c6d771cc2fc1f866a1edd04c57b98ff5f4;p=varnish 404 handling git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@336 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/rfc2616.c b/varnish-cache/bin/varnishd/rfc2616.c index e22f2bf1..a7a88c62 100644 --- a/varnish-cache/bin/varnishd/rfc2616.c +++ b/varnish-cache/bin/varnishd/rfc2616.c @@ -135,13 +135,13 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp) 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 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp) } return (body); - }