[3.0] 9d649d9 Expose resp.body for inspection and testing in varnishtest
Tollef Fog Heen
tfheen at varnish-cache.org
Thu May 24 14:47:44 CEST 2012
commit 9d649d9a7f7969d3e712bfe1f4db55aa9b33d549
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Tue Mar 27 14:12:33 2012 +0200
Expose resp.body for inspection and testing in varnishtest
Needed to test #1123
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 66e1d23..cb58704 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -196,6 +196,8 @@ cmd_var_resolve(struct http *hp, char *spec)
return(hp->chunklen);
if (!strcmp(spec, "resp.bodylen"))
return(hp->bodylen);
+ if (!strcmp(spec, "resp.body"))
+ return(hp->body != NULL ? hp->body : spec);
if (!memcmp(spec, "req.http.", 9)) {
hh = hp->req;
hdr = spec + 9;
More information about the varnish-commit
mailing list