[master] e93ce21 Minor polish

Poul-Henning Kamp phk at FreeBSD.org
Wed Sep 10 10:03:13 CEST 2014


commit e93ce21341a23d2d52cdd20969c478535c32973e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 10 08:03:02 2014 +0000

    Minor polish

diff --git a/bin/varnishd/cache/cache_http1_fsm.c b/bin/varnishd/cache/cache_http1_fsm.c
index ca6794b..499c7b9 100644
--- a/bin/varnishd/cache/cache_http1_fsm.c
+++ b/bin/varnishd/cache/cache_http1_fsm.c
@@ -571,6 +571,7 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
 	assert (req->req_step == R_STP_RECV);
 	switch(req->req_body_status) {
 	case REQ_BODY_CACHED:
+		return (0);
 	case REQ_BODY_FAIL:
 		return (-1);
 	case REQ_BODY_NONE:
@@ -587,6 +588,7 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
 
 	if (req->htc->content_length > maxsize) {
 		req->req_body_status = REQ_BODY_FAIL;
+		(void)VFP_Error(vfc, "Request body too big to cache");
 		return (-1);
 	}
 
@@ -600,7 +602,6 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
 		return (-1);
 	}
 
-
 	yet = req->htc->content_length;
 	if (yet < 0)
 		yet = 0;
@@ -642,7 +643,6 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
 	} while (vfps == VFP_OK);
 	VFP_Close(vfc);
 
-
 	if (l == 0) {
 
 		if (req->req_bodybytes != req->htc->content_length) {



More information about the varnish-commit mailing list