[PATCH 1/3] Expose resp.body for inspection and testing in varnishtest

Martin Blix Grydeland martin at varnish-software.com
Tue Apr 3 18:29:29 CEST 2012


Needed to test #1123
---
 bin/varnishtest/vtc_http.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 00be0be..0678efd 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -190,6 +190,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;
-- 
1.7.4.1




More information about the varnish-dev mailing list