This is a way not to cache blank pages or WSOD (white screen of death pages). WSOD pages are pages that have Content-Length: 0 header and return a HTTP/1.1 200 OK response which is not and error and Varnish will cache it.

Check http headers with curl.

$ curl -I
HTTP/1.1 200 OK
Content-Length: 0

Now the Varnish part.

sub vcl_fetch {

if (beresp.http.Content-Length == "0"){