Commit 0ea68238 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

404 handling


git-svn-id: http://www.varnish-cache.org/svn/trunk@336 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent db502a0e
...@@ -135,13 +135,13 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp) ...@@ -135,13 +135,13 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp)
sp->obj->response = http_GetStatus(hp); sp->obj->response = http_GetStatus(hp);
switch (sp->obj->response) { switch (sp->obj->response) {
case 200: /* OK */ case 200: /* OK */
sp->obj->valid = 1;
/* FALLTHROUGH */
case 203: /* Non-Authoritative Information */ case 203: /* Non-Authoritative Information */
case 300: /* Multiple Choices */ case 300: /* Multiple Choices */
case 301: /* Moved Permanently */ case 301: /* Moved Permanently */
case 410: /* Gone */ case 410: /* Gone */
case 404: /* Not Found */
sp->obj->cacheable = 1; sp->obj->cacheable = 1;
sp->obj->valid = 1;
body = 1; body = 1;
break; break;
default: default:
...@@ -157,6 +157,5 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp) ...@@ -157,6 +157,5 @@ RFC2616_cache_policy(struct sess *sp, struct http *hp)
} }
return (body); return (body);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment