[master] ce4c3214c Clarify reasoning with comment
Poul-Henning Kamp
phk at FreeBSD.org
Mon Nov 19 22:15:16 UTC 2018
commit ce4c3214c01da83481f54ac3d31ac001cc061028
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 19 11:44:12 2018 +0000
Clarify reasoning with comment
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index e8c2e542b..0b4141606 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -366,7 +366,7 @@ cnt_transmit(struct worker *wrk, struct req *req)
if (head || status < 200 || status == 204 || status == 304) {
// rfc7230,l,1748,1752
- sendbody = 0;
+ sendbody = 0;
} else {
sendbody = 1;
}
@@ -401,7 +401,14 @@ cnt_transmit(struct worker *wrk, struct req *req)
} else if (clval >= 0 && clval == req->resp_len) {
/* Reuse C-L header */
} else if (head && req->objcore->flags & OC_F_PASS) {
- /* Don't touch C-L header */
+ /*
+ * Don't touch C-L header (debatable)
+ *
+ * The only way to do it correctly would be to GET
+ * to the backend, and discard the body once the
+ * filters have had a chance to chew on it, but that
+ * would negate the "pass for huge objects" use case.
+ */
} else {
http_Unset(req->resp, H_Content_Length);
if (req->resp_len >= 0)
More information about the varnish-commit
mailing list