[master] 080fa4f Don't populate obj->http any more.

Poul-Henning Kamp phk at FreeBSD.org
Tue Aug 19 00:04:36 CEST 2014


commit 080fa4f97d81cd46a59eabe7cf3eabc10fff2d33
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 18 22:03:53 2014 +0000

    Don't populate obj->http any more.

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index b374308..5495af2 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -149,13 +149,13 @@ vbf_beresp2obj(struct busyobj *bo)
 	AZ(ObjSetU32(bo->vfc, OA_VXID, VXID(bo->vsl->wid)));
 	WS_Assert(bo->ws_o);
 
+	/* for HTTP_Encode() VSLH call */
+	bo->beresp->logtag = SLT_ObjMethod;
+
 	/* Filter into object */
-	obj->http->logtag = SLT_ObjMethod;
 	obj->oa_http = HTTP_Encode(bo->beresp, bo->ws_o,
 	    bo->uncacheable ? HTTPH_R_PASS : HTTPH_A_INS);
 	AN(obj->oa_http);
-	AZ(HTTP_Decode(obj->http,
-	    ObjGetattr(bo->fetch_objcore, bo->stats, OA_HEADERS, NULL)));
 
 	if (http_GetHdr(bo->beresp, H_Last_Modified, &b))
 		AZ(ObjSetDouble(bo->vfc, OA_LASTMODIFIED, VTIM_parse(b)));
diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index f79d173..75b0617 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -670,6 +670,7 @@ HTTP_Encode(const struct http *fm, struct ws *ws, unsigned how)
 			continue;
 #include "tbl/http_headers.h"
 #undef HTTPH
+		http_VSLH(fm, u);
 		w = Tlen(fm->hd[u]) + 1L;
 		if (p + w + 1 > e) {
 			WS_Release(ws, 0);



More information about the varnish-commit mailing list