projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a87900
)
BUG/MINOR: httpclient/lua: does not process headers when failed
author
William Lallemand
<wlallemand@haproxy.org>
Tue, 5 Oct 2021 14:19:31 +0000
(16:19 +0200)
committer
William Lallemand
<wlallemand@haproxy.org>
Wed, 6 Oct 2021 13:15:03 +0000
(15:15 +0200)
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.
src/hlua.c
patch
|
blob
|
history
diff --git
a/src/hlua.c
b/src/hlua.c
index
5bb0535
..
9589473
100644
(file)
--- a/
src/hlua.c
+++ b/
src/hlua.c
@@
-6988,7
+6988,7
@@
__LJMP static int hlua_httpclient_get_headers(lua_State *L, struct hlua_httpclie
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;