[master] 8c4ae4f0e Revert "fetch: A beresp body cannot be BS_TAKEN"
Nils Goroll
nils.goroll at uplex.de
Mon Aug 12 13:19:07 UTC 2024
commit 8c4ae4f0e1c1990a48884b36e2b3e9acc8d162a1
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Jul 31 20:37:02 2024 +0200
Revert "fetch: A beresp body cannot be BS_TAKEN"
correct, but bo->htc->body_status is about the be*req* body
This reverts commit f4b045031cbd343fabca4e7d8ef0a7e14c4dbb62.
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index b56cae814..647201b7a 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -141,11 +141,10 @@ Bereq_Rollback(VRT_CTX)
bo = ctx->bo;
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
- if (bo->htc != NULL) {
- assert(bo->htc->body_status != BS_TAKEN);
- if (bo->htc->body_status != BS_NONE)
- bo->htc->doclose = SC_RESP_CLOSE;
- }
+ if (bo->htc != NULL &&
+ bo->htc->body_status != BS_NONE &&
+ bo->htc->body_status != BS_TAKEN)
+ bo->htc->doclose = SC_RESP_CLOSE;
vbf_cleanup(bo);
VCL_TaskLeave(ctx, bo->privs);
More information about the varnish-commit
mailing list