[master] 83c5ead Tolerate an empty status line elements in case we've run out of ws handling an error
Nils Goroll
nils.goroll at uplex.de
Mon Jun 27 14:55:08 CEST 2016
commit 83c5ead8ff1563823c91eb00c6394b3720911853
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Jun 27 14:52:07 2016 +0200
Tolerate an empty status line elements in case we've run out of ws handling an error
When handling a fetch error we may not even have had memory to store
the status code.
Fixes #1990
diff --git a/bin/varnishd/cache/cache_http.c b/bin/varnishd/cache/cache_http.c
index 3efd78a..d6bfb28 100644
--- a/bin/varnishd/cache/cache_http.c
+++ b/bin/varnishd/cache/cache_http.c
@@ -796,6 +796,8 @@ http_EstimateWS(const struct http *fm, unsigned how)
for (u = 0; u < fm->nhd; u++) {
if (u == HTTP_HDR_METHOD || u == HTTP_HDR_URL)
continue;
+ if (u < HTTP_HDR_FIRST && fm->hd[u].b == NULL)
+ continue;
Tcheck(fm->hd[u]);
if (fm->hdf[u] & HDF_FILTER)
continue;
More information about the varnish-commit
mailing list