Mailing List Archive

r2094 - trunk/varnish-cache/bin/varnishd
Author: phk
Date: 2007-10-08 18:40:28 +0200 (Mon, 08 Oct 2007)
New Revision: 2094

Modified:
trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Give the 503 returns a protocol and a response as well.


Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-08 15:34:32 UTC (rev 2093)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c 2007-10-08 16:40:28 UTC (rev 2094)
@@ -306,8 +306,12 @@

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);