[master] 027cef367 cache_vrt_var: unset bereq.body should remove Content-Length
Nils Goroll
nils.goroll at uplex.de
Fri Feb 7 11:27:07 UTC 2025
commit 027cef3676992204d2c01911c59b6245c8db5041
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Fri Feb 7 12:14:09 2025 +0100
cache_vrt_var: unset bereq.body should remove Content-Length
Address a valid argument by Dridi in #4228
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 98fbda953..778c9a42f 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -641,6 +641,8 @@ VRT_u_bereq_body(VRT_CTX)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(ctx->bo, BUSYOBJ_MAGIC);
+ http_Unset(ctx->bo->bereq, H_Content_Length);
+
if (ctx->bo->bereq_body != NULL)
(void)HSH_DerefObjCore(ctx->bo->wrk, &ctx->bo->bereq_body, 0);
More information about the varnish-commit
mailing list