[4.0] 51ab3f2 Collapse two fetch states and make the X-Varnish heading for the backend available in vcl_backend_fetch{}
Poul-Henning Kamp
phk at FreeBSD.org
Thu Mar 13 10:24:29 CET 2014
commit 51ab3f207c2b6a3c3ac1c3411be232730801db39
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 3 09:03:51 2014 +0000
Collapse two fetch states and make the X-Varnish heading for the backend
available in vcl_backend_fetch{}
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 0c621df..c52ba05 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -265,6 +265,7 @@ vbf_stp_retry(struct worker *wrk, struct busyobj *bo)
static enum fetch_step
vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
{
+ int i, do_ims;
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
@@ -277,12 +278,12 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, SLT_BereqMethod);
HTTP_Copy(bo->bereq, bo->bereq0);
+ http_PrintfHeader(bo->bereq,
+ "X-Varnish: %u", bo->vsl->wid & VSL_IDENTMASK);
+
VCL_backend_fetch_method(bo->vcl, wrk, NULL, bo, bo->bereq->ws);
bo->uncacheable = bo->do_pass;
-
- http_PrintfHeader(bo->bereq,
- "X-Varnish: %u", bo->vsl->wid & VSL_IDENTMASK);
if (wrk->handling == VCL_RET_ABANDON) {
if (bo->req != NULL)
vbf_release_req(bo);
@@ -291,22 +292,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
return (F_STP_DONE);
}
assert (wrk->handling == VCL_RET_FETCH);
- return (F_STP_FETCHHDR);
-}
-
-
-/*--------------------------------------------------------------------
- */
-
-static enum fetch_step
-vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
-{
- int i, do_ims;
-
- CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
- CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
-
- xxxassert (wrk->handling == VCL_RET_FETCH);
HTTP_Setup(bo->beresp, bo->ws, bo->vsl, SLT_BerespMethod);
diff --git a/include/tbl/steps.h b/include/tbl/steps.h
index 9ef7f6c..47da3fc 100644
--- a/include/tbl/steps.h
+++ b/include/tbl/steps.h
@@ -52,7 +52,6 @@ REQ_STEP(error, ERROR, (wrk, req))
FETCH_STEP(mkbereq, MKBEREQ, (wrk, bo))
FETCH_STEP(retry, RETRY, (wrk, bo))
FETCH_STEP(startfetch, STARTFETCH, (wrk, bo))
-FETCH_STEP(fetchhdr, FETCHHDR, (wrk, bo))
FETCH_STEP(condfetch, CONDFETCH, (wrk, bo))
FETCH_STEP(fetch, FETCH, (wrk, bo))
FETCH_STEP(error, ERROR, (wrk, bo))
More information about the varnish-commit
mailing list