[master] 287e405 Eliminate bo->content_length
Poul-Henning Kamp
phk at FreeBSD.org
Mon Sep 15 08:37:56 CEST 2014
commit 287e405a7f79d2d702a355751a4d5658b076be3f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Sep 11 20:21:53 2014 +0000
Eliminate bo->content_length
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index b7591c8..7c18ae9 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -517,8 +517,6 @@ struct busyobj {
struct pool_task fetch_task;
- ssize_t content_length;
-
enum sess_close doclose;
#define BO_FLAG(l, r, w, d) unsigned l:1;
diff --git a/bin/varnishd/cache/cache_busyobj.c b/bin/varnishd/cache/cache_busyobj.c
index a3f4092..a0c0666 100644
--- a/bin/varnishd/cache/cache_busyobj.c
+++ b/bin/varnishd/cache/cache_busyobj.c
@@ -149,7 +149,6 @@ VBO_GetBusyObj(struct worker *wrk, const struct req *req)
VCL_Ref(bo->vcl);
bo->t_first = bo->t_prev = NAN;
- bo->content_length = -1;
bo->doclose = SC_NULL;
return (bo);
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 3d48293..79db1dd 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -349,7 +349,6 @@ vbf_stp_startfetch(struct worker *wrk, struct busyobj *bo)
wrk->stats.fetch_chunked++;
} else if (bo->htc->body_status == BS_LENGTH) {
assert(bo->htc->content_length > 0);
- bo->content_length = bo->htc->content_length;
wrk->stats.fetch_length++;
} else if (bo->htc->body_status == BS_EOF) {
wrk->stats.fetch_eof++;
@@ -451,7 +450,7 @@ vbf_fetch_body_helper(struct busyobj *bo)
AN(vfc->vfp_nxt);
- est = bo->content_length;
+ est = bo->htc->content_length;
if (est < 0)
est = 0;
More information about the varnish-commit
mailing list