From: phk Date: Mon, 8 Oct 2007 16:40:28 +0000 (+0000) Subject: Give the 503 returns a protocol and a response as well. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ff70b093dca2a1b1da7314f470c7d65065adea9;p=varnish Give the 503 returns a protocol and a response as well. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2094 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 645ed04a..7bb6e8b0 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -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);