Check body length in VCL

Poul-Henning Kamp phk at
Wed Aug 11 22:40:57 CEST 2010

In message <AANLkTimHL7J-pN1NWiqYMPqdjt21aRGcZNoioHEgHrHH at>, "T. 
Pascal" writes:

>if ((beresp.status == 200) && (length(body) > 3000)) {

The trouble is that vcl_fetch is called before the body is fetched
from the backend, so we cannot know the length, if the transfer
method is EOF or chunked...

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list