]> err.no Git - varnish/commitdiff
Give the 503 returns a protocol and a response as well.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 16:40:28 +0000 (16:40 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 8 Oct 2007 16:40:28 +0000 (16:40 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2094 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_center.c

index 645ed04a6a10390a3e3bacaa7d555f9a9514981d..7bb6e8b0471838ae06fb2d58e63a9f3a9b10f803 100644 (file)
@@ -306,8 +306,12 @@ cnt_fetch(struct sess *sp)
 
        if (!i)
                RFC2616_cache_policy(sp, sp->obj->http);        /* XXX -> VCL */
-       else
+       else {
                http_PutStatus(sp->wrk, sp->fd, sp->obj->http, 503);
+               http_PutProtocol(sp->wrk, sp->fd, sp->obj->http, "HTTP/1.1");
+               http_PutResponse(sp->wrk, sp->fd, sp->obj->http,
+                   "Backend error");
+       }
 
        sp->err_code = http_GetStatus(sp->obj->http);
        VCL_fetch_method(sp);