This whole compatibility file needs to be revisited to be less a copy of what the old Varnish code was, and to work with the new one instead. Ideally the compatibility file should only be some ...