[master] cf6f2af Polish

Poul-Henning Kamp phk at varnish-cache.org
Thu May 23 17:54:26 CEST 2013


commit cf6f2af9f3e02c5b35e279fd64fc546c5111a153
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu May 23 15:54:17 2013 +0000

    Polish

diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 3b27ab0..f48fb20 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -368,7 +368,6 @@ FetchHdr(struct worker *wrk, struct busyobj *bo, struct req *req)
 	int retry = -1;
 	int i, first;
 	struct http_conn *htc;
-        int need_host_hdr;
 
 	CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
 	CHECK_OBJ_ORNULL(req, REQ_MAGIC);
@@ -377,8 +376,6 @@ FetchHdr(struct worker *wrk, struct busyobj *bo, struct req *req)
 
 	AN(bo->director);
 
-	need_host_hdr = !http_GetHdr(bo->bereq, H_Host, NULL);
-
 	hp = bo->bereq;
 
 	bo->vbc = VDI_GetFd(NULL, bo);
@@ -395,7 +392,7 @@ FetchHdr(struct worker *wrk, struct busyobj *bo, struct req *req)
 	 * header if one is necessary.  This cannot be done in the VCL
 	 * because the backend may be chosen by a director.
 	 */
-	if (need_host_hdr)
+	if (!http_GetHdr(bo->bereq, H_Host, NULL))
 		VDI_AddHostHeader(bo->bereq, vc);
 
 	(void)VTCP_blocking(vc->fd);	/* XXX: we should timeout instead */
@@ -899,7 +896,6 @@ VBF_Fetch(struct worker *wrk, struct req *req)
 	if (bo->exp.ttl < cache_param->shortlived || bo->do_pass == 1)
 		bo->storage_hint = TRANSIENT_STORAGE;
 
-
 	/*
 	 * Space for producing a Content-Length: header including padding
 	 * A billion gigabytes is enough for anybody.



More information about the varnish-commit mailing list