Without the Content-Length header, the response is sent with
Transfer-Encoding: Chunked, which is somehow mangled by
mod_fastcgi. Varnish then claims the response is malformed and declines
to process it, sending the client a 503 instead.
This is a followup of
0ee9e717f49b9e15bd63fd66f3d0967939c35b05
Bug: T84842
Change-Id: Ia610a43789e6ff14cfc0964f285bbec39c890152
if ( count( $varyHeader ) ) {
$response->header( 'Vary: ' . implode( ', ', $varyHeader ) );
}
+ $response->header( 'Content-Length: 0' );
return;
}