mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
BUG/MINOR: lua/htx: Make txn.req_req_* and txn.res_rep_* HTX aware
These bindings were not updated to support HTX streams. This patch must be backported to 2.0 and 1.9. It fixes the issue #124.
This commit is contained in:
parent
da29fe2360
commit
ea418748dd
@ -5375,6 +5375,12 @@ __LJMP static inline int hlua_http_rep_hdr(lua_State *L, struct hlua_txn *htxn,
|
||||
if (!(re = regex_comp(reg, 1, 1, NULL)))
|
||||
WILL_LJMP(luaL_argerror(L, 3, "invalid regex"));
|
||||
|
||||
if (IS_HTX_STRM(htxn->s)) {
|
||||
struct htx *htx = htxbuf(&msg->chn->buf);
|
||||
|
||||
htx_transform_header_str(htxn->s, msg->chn, htx, ist2(name, name_len), value, re, action);
|
||||
}
|
||||
else
|
||||
http_transform_header_str(htxn->s, msg, name, name_len, value, re, action);
|
||||
regex_free(re);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user