]> err.no Git - varnish/commitdiff
404 handling
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 6 Jul 2006 08:32:38 +0000 (08:32 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 6 Jul 2006 08:32:38 +0000 (08:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@336 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/rfc2616.c

index e22f2bf1bd66cbdcd0f6701049623494ac0e7480..a7a88c62e0615bd4fe06f21caf806ee4d3ee618e 100644 (file)
@@ -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);
-
 }