[master] 0cdcd31 Make req.body available in varnishtest

Federico G. Schwindt fgsch at lodoss.net
Tue Feb 16 21:28:18 CET 2016


commit 0cdcd31108ede87f13e9ff6a10fda60d78ca5b91
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Tue Feb 16 19:59:33 2016 +0000

    Make req.body available in varnishtest

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 7822ebc..9160a66 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -219,6 +219,8 @@ cmd_var_resolve(struct http *hp, char *spec)
 		return(hp->chunklen);
 	if (!strcmp(spec, "req.bodylen"))
 		return(hp->bodylen);
+	if (!strcmp(spec, "req.body"))
+		return(hp->body != NULL ? hp->body : spec);
 	if (!strcmp(spec, "resp.bodylen"))
 		return(hp->bodylen);
 	if (!strcmp(spec, "resp.body"))



More information about the varnish-commit mailing list