[master] a701b66 Eliminate a unused REQ_BODY state

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 8 20:14:52 CEST 2014


commit a701b66ca10af4a86d6c7a27cb327d22e965a2bd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 8 18:14:27 2014 +0000

    Eliminate a unused REQ_BODY state

diff --git a/bin/varnishd/cache/cache_http1_fetch.c b/bin/varnishd/cache/cache_http1_fetch.c
index 4b76f46..6df8fcf 100644
--- a/bin/varnishd/cache/cache_http1_fetch.c
+++ b/bin/varnishd/cache/cache_http1_fetch.c
@@ -300,7 +300,7 @@ V1F_fetch_hdr(struct worker *wrk, struct busyobj *bo, struct req *req)
 		} else {
 			i = HTTP1_IterateReqBody(req, vbf_iter_req_body, wrk);
 		}
-		if (req->req_body_status == REQ_BODY_DONE) {
+		if (req->req_body_status == REQ_BODY_TAKEN) {
 			retry = -1;
 		} else if (req->req_body_status == REQ_BODY_FAIL) {
 			VSLb(bo->vsl, SLT_FetchError,
diff --git a/bin/varnishd/cache/cache_http1_fsm.c b/bin/varnishd/cache/cache_http1_fsm.c
index 3a1a7cc..f29df20 100644
--- a/bin/varnishd/cache/cache_http1_fsm.c
+++ b/bin/varnishd/cache/cache_http1_fsm.c
@@ -474,7 +474,6 @@ HTTP1_IterateReqBody(struct req *req, req_body_iter_f *func, void *priv)
 	case REQ_BODY_PRESENT:
 	case REQ_BODY_CHUNKED:
 		break;
-	case REQ_BODY_DONE:
 	case REQ_BODY_TAKEN:
 		VSLb(req->vsl, SLT_VCL_Error,
 		    "Uncached req.body can only be consumed once.");
@@ -553,8 +552,6 @@ int
 HTTP1_DiscardReqBody(struct req *req)
 {
 
-	if (req->req_body_status == REQ_BODY_DONE)
-		return(0);
 	if (req->req_body_status == REQ_BODY_FAIL)
 		return(0);
 	if (req->req_body_status == REQ_BODY_TAKEN)
diff --git a/include/tbl/req_body.h b/include/tbl/req_body.h
index 83744cc..9e58deb 100644
--- a/include/tbl/req_body.h
+++ b/include/tbl/req_body.h
@@ -34,7 +34,6 @@ REQ_BODY(PRESENT)
 REQ_BODY(CHUNKED)
 REQ_BODY(TAKEN)
 REQ_BODY(CACHED)
-REQ_BODY(DONE)
 REQ_BODY(FAIL)
 REQ_BODY(NONE)
 



More information about the varnish-commit mailing list