[master] 5bd96abdb Dont take a pointless extra round through VGZ if we are already done.

Poul-Henning Kamp phk at FreeBSD.org
Mon May 15 10:15:08 UTC 2023


commit 5bd96abdb40e51b9e3266bc79bb06495a34725dd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon May 15 10:13:24 2023 +0000

    Dont take a pointless extra round through VGZ if we are already done.

diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index b73ca938e..d97985734 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -623,7 +623,8 @@ vfp_gzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
 				VGZ_UpdateObj(vc, vg, VUA_UPDATE);
 				*lp = dl;
 				assert(dp == p);
-				return (VFP_OK);
+				if (vr != VGZ_END || !VGZ_IbufEmpty(vg))
+					return (VFP_OK);
 			}
 		}
 		AN(VGZ_IbufEmpty(vg));


More information about the varnish-commit mailing list