Mailing List Archive

[6.0] 8f8c85c4a Add an assert that the status is valid on entry to h2_build_headers
commit 8f8c85c4a9cf485c8013623041511fa8f7e3b0aa
Author: Martin Blix Grydeland <martin@varnish-software.com>
Date: Tue May 5 13:36:22 2020 +0200

Add an assert that the status is valid on entry to h2_build_headers

Conflicts:
bin/varnishd/http2/cache_http2_deliver.c

diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index ee255067e..ee9f40cb2 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -238,6 +238,7 @@ h2_build_headers(struct vsb *resp, struct req *req)

AN(VSB_new(resp, req->ws->f, l, VSB_FIXEDLEN));

+ assert(req->resp->status % 1000 >= 100);
l = h2_status(buf, req->resp->status % 1000);
VSB_bcat(resp, buf, l);

_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit