[master] 031976a Complain loudly if we try to gunzip and the magic bytes are missing

Poul-Henning Kamp phk at project.varnish-software.com
Fri Jan 21 15:30:24 CET 2011


commit 031976a0a7765e215c00af14c0057b40b1a749cc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Jan 21 12:50:23 2011 +0000

    Complain loudly if we try to gunzip and the magic bytes are missing

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index a534fdd..2b05c38 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -531,6 +531,8 @@ cmd_http_gunzip_body(CMD_ARGS)
 
 	memset(&vz, 0, sizeof vz);
 
+	if (hp->body[0] != (char)0x1f || hp->body[1] != (char)0x8b)
+		vtc_log(hp->vl, 0, "Gunzip error: Body lacks gzip magics");
 	vz.next_in = TRUST_ME(hp->body);
 	vz.avail_in = hp->bodyl;
 



More information about the varnish-commit mailing list