How to you display the 503 error as sent from the backend....

Dave Dierker ddierker at
Mon Mar 25 19:20:36 CET 2013

vcl_error, for 503 errors from the backend, appears to cloak what the
backend server sends.

 There are cases where presenting to user the full 503 response, as sent
by the backend, makes sense.

As a trivial example: a PHP script that returns a custom 503 error
response is completely cloaked/hidden by the varnish code:
header('HTTP/1.1 503 Smeagol ate your puppy!');
header('Status: 503 Smeagol ate your puppy!');header('Retry-After:
300');//300 seconds
header('Content-Type: text/plain');
?>503 Smeagol ate your puppy!

Whatever the vcl_error generates in the synthetic response is sent...
and if a synthetic response isn't provided nothing gets sent to the
client (last I tried it.)

Even the status text from the obj.response code returns "Service
Unavailable" instead of "Smeagol ate your puppy!".

Is there any way to get varnish to pass the 503 through as it came from
the backend?

More information about the varnish-misc mailing list