[master] 62925c477 http: Don't expect an overflowed workspace on failure

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Sep 15 07:04:06 UTC 2020


commit 62925c477b8bef8d89a564a792e1d32945e38ab5
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Sep 15 09:01:09 2020 +0200

    http: Don't expect an overflowed workspace on failure
    
    If we lose a header from http_SetHeader() we don't formally run out of
    workspace prior to calling http_fail().
    
    Refs #3410

diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index 9760f79a1..9fa4c1f64 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -117,7 +117,7 @@ http_fail(const struct http *hp)
 	VSC_C_main->losthdr++;
 	WS_Id(hp->ws, id);
 	VSLb(hp->vsl, SLT_Error, "out of workspace (%s)", id);
-	assert(WS_Overflowed(hp->ws));
+	WS_MarkOverflow(hp->ws);
 }
 
 /*--------------------------------------------------------------------


More information about the varnish-commit mailing list