commit | ef574b2101458d3af6b4c1453a7b5edadf001b66 | [log] [tgz] |
---|---|---|
author | William Lallemand <wlallemand@haproxy.org> | Tue Oct 05 16:19:31 2021 +0200 |
committer | William Lallemand <wlallemand@haproxy.org> | Wed Oct 06 15:15:03 2021 +0200 |
tree | e72c4cbd0cd80c594aed7d74921571eace9db2ce | |
parent | 2a879001b5ce4b3cf3998c49a2886651e69fcf45 [diff] |
BUG/MINOR: httpclient/lua: does not process headers when failed Do not try to process the header list when it is NULL. This case can arrive when the request failed and did not return a response.
diff --git a/src/hlua.c b/src/hlua.c index 5bb0535..9589473 100644 --- a/src/hlua.c +++ b/src/hlua.c
@@ -6988,7 +6988,7 @@ lua_newtable(L); - for (hdr = hlua_hc->hc->res.hdrs; isttest(hdr->n); hdr++) { + for (hdr = hlua_hc->hc->res.hdrs; hdr && isttest(hdr->n); hdr++) { struct ist n, v; int len;