[3.0] 21b7258 I have not been able to reproduce this exact circumstance, but the fix is readily obvious, so: Tighten requirement for range delivery.
Tollef Fog Heen
tfheen at varnish-cache.org
Thu Sep 22 14:01:54 CEST 2011
commit 21b7258b2b618350a46d96ea07ff5fee3a653b28
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Sep 6 08:15:06 2011 +0000
I have not been able to reproduce this exact circumstance, but the
fix is readily obvious, so: Tighten requirement for range delivery.
Fixes #1007
diff --git a/bin/varnishd/cache_response.c b/bin/varnishd/cache_response.c
index c592909..73338f7 100644
--- a/bin/varnishd/cache_response.c
+++ b/bin/varnishd/cache_response.c
@@ -276,9 +276,13 @@ RES_WriteObj(struct sess *sp)
*/
low = 0;
high = sp->obj->len - 1;
- if (!(sp->wrk->res_mode & (RES_ESI|RES_ESI_CHILD|RES_GUNZIP)) &&
- params->http_range_support && sp->obj->response == 200 &&
- sp->wantbody && http_GetHdr(sp->http, H_Range, &r))
+ if (
+ sp->wantbody &&
+ (sp->wrk->res_mode & RES_LEN) &&
+ !(sp->wrk->res_mode & (RES_ESI|RES_ESI_CHILD|RES_GUNZIP)) &&
+ params->http_range_support &&
+ sp->obj->response == 200 &&
+ http_GetHdr(sp->http, H_Range, &r))
res_dorange(sp, r, &low, &high);
/*
More information about the varnish-commit
mailing list