From 5ff70b093dca2a1b1da7314f470c7d65065adea9 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 8 Oct 2007 16:40:28 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/cache_center.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5