Fix bugs with headers in Varnish class