[master] eef05a8 Eliminate BS_ZERO, it's same as BS_NONE.
Poul-Henning Kamp
phk at varnish-cache.org
Tue Nov 26 21:24:37 CET 2013
commit eef05a8a013adc21116991f2b7c7311c1351164c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Nov 26 20:24:09 2013 +0000
Eliminate BS_ZERO, it's same as BS_NONE.
Explicitly set BS_NONE for synth 503.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index 001cb61..576fffc 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -199,6 +199,8 @@ vbf_stp_fetchhdr(struct worker *wrk, struct busyobj *bo)
* NB: Also sets other wrk variables
*/
bo->htc.body_status = RFC2616_Body(bo, &wrk->stats);
+ if (i && bo->htc.body_status == BS_LENGTH)
+ bo->htc.body_status = BS_NONE;
bo->err_code = http_GetStatus(bo->beresp);
diff --git a/bin/varnishd/cache/cache_http1_fetch.c b/bin/varnishd/cache/cache_http1_fetch.c
index 0b25437..f236053 100644
--- a/bin/varnishd/cache/cache_http1_fetch.c
+++ b/bin/varnishd/cache/cache_http1_fetch.c
@@ -342,8 +342,6 @@ V1F_fetch_body(struct busyobj *bo)
switch (htc->body_status) {
case BS_NONE:
break;
- case BS_ZERO:
- break;
case BS_LENGTH:
cl = vbf_fetch_number(bo->h_content_length, 10);
diff --git a/bin/varnishd/cache/cache_rfc2616.c b/bin/varnishd/cache/cache_rfc2616.c
index 4bd45ca..dcf4c55 100644
--- a/bin/varnishd/cache/cache_rfc2616.c
+++ b/bin/varnishd/cache/cache_rfc2616.c
@@ -259,7 +259,7 @@ RFC2616_Body(struct busyobj *bo, struct dstat *stats)
* We assume a zero length body.
*/
stats->fetch_zero++;
- return (BS_ZERO);
+ return (BS_NONE);
}
if (http_HdrIs(hp, H_Connection, "close")) {
diff --git a/include/tbl/body_status.h b/include/tbl/body_status.h
index 33803f9..5f6031f 100644
--- a/include/tbl/body_status.h
+++ b/include/tbl/body_status.h
@@ -30,7 +30,6 @@
/*lint -save -e525 -e539 */
BODYSTATUS(NONE, none)
-BODYSTATUS(ZERO, zero)
BODYSTATUS(ERROR, error)
BODYSTATUS(CHUNKED, chunked)
BODYSTATUS(LENGTH, length)
More information about the varnish-commit
mailing list