We're caching for a problematic IIS server that sometimes just sends empty responses (0 bytes) instead of proper ones. Caching these responses would be a disaster, and we have no way of fixing the problem as it's not our server. Instead I'd like to instruct Varnish to not cache responses from the backend if they are empty (0 bytes).
Reading the VCL reference (https://www.varnish-cache.org/docs/4.0/reference/vcl.html) I can't see any obvious way of solving this.
Can it be done?