haproxy/src
vishnu 0af4bd7beb BUG/MEDIUM: lua: fix invalid return types in hlua_http_msg_get_body
hlua_http_msg_get_body must return either a Lua string or nil. For some
HTTPMessage objects, HTX_BLK_EOT blocks are also present in the HTX buffer
along with HTX_BLK_DATA blocks. In such cases, _hlua_http_msg_dup will start
copying data into a luaL_Buffer until it encounters an HTX_BLK_EOT. But then
instead of pushing neither the luaL_Buffer nor `nil` to the Lua stack, the
function will return immediately. The end result will be that the caller of
the HTTPMessage.body() method from a Lua filter will see whatever object was
on top of the stack as return value. It may be either a userdata object if
HTTPMessage.body() was called with only two arguments, or the third argument
itself if called with three arguments. Hence HTTPMessage.body() would return
either nil, or HTTPMessage body as Lua string, or a userdata objects, or
number.

This fix ensure that HTTPMessage.body() will always return either a string
or nil.

Reviewed-by: Christopher Faulet <cfaulet@haproxy.com>
2021-10-27 11:04:16 +02:00
..
acl.c MINOR: add ::1 to predefined LOCALHOST acl 2021-10-18 07:21:28 +02:00
action.c MINOR: rules: add a file name and line number to act_rules 2021-10-12 07:38:30 +02:00
activity.c MINOR: memprof: add one pointer size to the size of allocations 2021-10-22 16:40:09 +02:00
applet.c
arg.c MINOR: arg: Be able to forbid unresolved args when building an argument list 2021-09-30 16:37:05 +02:00
auth.c
backend.c MINOR: backend: improve perf with tcp proxies skipping idle conns 2021-10-22 17:28:29 +02:00
base64.c BUG/MINOR: base64: base64urldec() ignores padding in output size check 2021-08-25 16:14:14 +02:00
cache.c BUG/MINOR: cache: Correctly handle existing-but-empty 'accept-encoding' header 2021-06-18 15:48:20 +02:00
calltrace.c
cbuf.c MINOR: quic: Make circular buffer internal buffers be variable-sized. 2021-09-23 15:27:25 +02:00
cfgcond.c MINOR: ssl: Add ssllib_name_startswith precondition 2021-10-13 11:28:08 +02:00
cfgdiag.c
cfgparse-global.c MINOR: config: use a standard parser for the "nbthread" keyword 2021-09-27 09:47:40 +02:00
cfgparse-listen.c BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags 2021-10-15 14:12:19 +02:00
cfgparse-ssl.c BUILD: cfgparse-ssl: add missing errors.h 2021-10-07 01:36:51 +02:00
cfgparse-tcp.c
cfgparse-unix.c
cfgparse.c CLEANUP: Apply strcmp.cocci 2021-10-18 07:17:04 +02:00
channel.c
check.c BUG/MEDIUM: checks: fix the starting thread for external checks 2021-10-20 18:43:30 +02:00
chunk.c
cli.c CLEANUP: Apply strcmp.cocci 2021-10-18 07:17:04 +02:00
clock.c REORG: thread/clock: move the clock parts of thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
compression.c REORG: thread/clock: move the clock parts of thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
connection.c MINOR: connection: remove unneeded memset 0 for idle conns 2021-10-22 17:29:25 +02:00
cpuset.c BUG/MEDIUM: cpuset: fix cpuset size for FreeBSD 2021-10-15 17:16:11 +02:00
debug.c MINOR: debug: report the group and thread ID in the thread dumps 2021-10-08 17:22:26 +02:00
dgram.c
dict.c
dns.c OPTIM: dns: use an atomic check for the list membership 2021-10-21 15:28:42 +02:00
dynbuf.c REORG: thread/sched: move the last dynamic thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
eb32sctree.c
eb32tree.c
eb64tree.c
ebimtree.c
ebistree.c
ebmbtree.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
ebpttree.c
ebsttree.c
ebtree.c
errors.c CLEANUP: Apply xalloc_size.cocci 2021-09-17 17:22:05 +02:00
ev_epoll.c MINOR: activity: get the run_time from the clock updates 2021-10-08 17:22:26 +02:00
ev_evports.c MINOR: activity: get the run_time from the clock updates 2021-10-08 17:22:26 +02:00
ev_kqueue.c MINOR: activity: get the run_time from the clock updates 2021-10-08 17:22:26 +02:00
ev_poll.c MINOR: activity: get the run_time from the clock updates 2021-10-08 17:22:26 +02:00
ev_select.c MINOR: activity: get the run_time from the clock updates 2021-10-08 17:22:26 +02:00
extcheck.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
fcgi-app.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
fcgi.c
fd.c REORG: thread/sched: move the thread_info flags to the thread_ctx 2021-10-08 17:22:26 +02:00
filters.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
fix.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
flt_http_comp.c REORG: thread/clock: move the clock parts of thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
flt_spoe.c REORG: thread/sched: move the last dynamic thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
flt_trace.c BUG/MINOR: flt-trace: fix an infinite loop when random-parsing is set 2021-09-20 16:06:58 +02:00
freq_ctr.c CLEANUP: tree-wide: remove unneeded include time.h in ~20 files 2021-10-07 01:41:14 +02:00
frontend.c MINOR: sample/arg: Be able to resolve args found in defaults sections 2021-10-15 14:12:19 +02:00
h1_htx.c BUG/MEDIUM: mux-h1: Adjust conditions to ask more space in the channel buffer 2021-09-23 16:13:17 +02:00
h1.c MINOR: h1: Change T-E header parsing to fail if chunked encoding is found twice 2021-09-28 16:21:25 +02:00
h2.c BUG/MEDIUM: h2: match absolute-path not path-absolute for :path 2021-08-19 23:38:18 +02:00
h3.c CLEANUP: assorted typo fixes in the code and comments 2021-10-18 07:26:19 +02:00
haproxy.c MINOR: proxy: Be able to reference the defaults section used by a proxy 2021-10-15 14:12:19 +02:00
hash.c
hlua_fcn.c BUILD: idleconns: include missing ebmbtree.h at several places 2021-10-07 01:36:51 +02:00
hlua.c BUG/MEDIUM: lua: fix invalid return types in hlua_http_msg_get_body 2021-10-27 11:04:16 +02:00
hpack-dec.c
hpack-enc.c
hpack-huff.c
hpack-tbl.c
http_acl.c
http_act.c BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags 2021-10-15 14:12:19 +02:00
http_ana.c MEDIUM: http-ana: Eval HTTP rules defined in defaults sections 2021-10-15 14:12:19 +02:00
http_client.c MINOR: httpclient: support payload within a buffer 2021-10-27 10:19:41 +02:00
http_conv.c BUG/MINOR threads: Use get_(local|gm)time instead of (local|gm)time 2021-08-30 06:14:32 +02:00
http_fetch.c MINOR: http: Add http_auth_bearer sample fetch 2021-10-14 16:38:07 +02:00
http_htx.c BUG/MINOR: sample: fix backend direction flags consecutive to last fix 2021-10-16 14:41:09 +02:00
http_rules.c BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags 2021-10-15 14:12:19 +02:00
http.c MINOR: http: Add 422-Unprocessable-Content error message 2021-09-28 16:21:25 +02:00
htx.c MINOR: htx: Add an HTX flag to know when a message is fragmented 2021-09-23 16:19:36 +02:00
init.c
jwt.c MINOR: jwt: Do not rely on enum order anymore 2021-10-18 16:02:31 +02:00
lb_chash.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fas.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fwlc.c BUG/MEDIUM: leastconn: fix rare possibility of divide by zero 2021-09-22 07:24:02 +02:00
lb_fwrr.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
lb_map.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
listener.c CLEANUP: listeners: remove unreachable code in clone_listener() 2021-10-16 14:58:30 +02:00
log.c MINOR: tcpcheck: Support 2-steps args resolution in defaults sections 2021-10-15 14:12:19 +02:00
lru.c
mailers.c MINOR: task: provide 3 task_new_* wrappers to simplify the API 2021-10-01 18:36:29 +02:00
map.c
mjson.c
mqtt.c BUG/MINOR: mqtt: Support empty client ID in CONNECT message 2021-06-28 16:29:44 +02:00
mux_fcgi.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
mux_h1.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
mux_h2.c MINOR: mux-h2: perform a full cycle shutdown+drain on close 2021-10-21 22:24:31 +02:00
mux_pt.c MINOR: stream-int: Notify mux when the buffer is not stuck when calling rcv_buf 2021-09-23 16:25:47 +02:00
mux_quic.c MINOR: quic: handle CONNECTION_CLOSE frame 2021-10-13 16:38:56 +02:00
mworker-prog.c BUILD: mworker: mworker-prog needs time.h for the 'now' variable 2021-10-07 01:36:51 +02:00
mworker.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
namespace.c
pattern.c CLEANUP: Add haproxy/xxhash.h to avoid modifying import/xxhash.h 2021-09-11 19:58:45 +02:00
payload.c
peers.c MEDIUM: stick-table: never learn the "conn_cur" value from peers 2021-10-08 17:53:12 +02:00
pipe.c
pool.c REORG: thread/sched: move the last dynamic thread_info to thread_ctx 2021-10-08 17:22:26 +02:00
proto_quic.c MINOR: protocol: uniformize protocol errors 2021-10-14 21:22:52 +02:00
proto_sockpair.c MEDIUM: listeners: split the thread mask between receiver and bind_conf 2021-10-14 21:27:48 +02:00
proto_tcp.c BUG/MINOR: listener: add an error check for unallocatable trash 2021-10-16 14:54:19 +02:00
proto_udp.c MINOR: protocol: uniformize protocol errors 2021-10-14 21:22:52 +02:00
proto_uxdg.c MINOR: protocol: uniformize protocol errors 2021-10-14 21:22:52 +02:00
proto_uxst.c MINOR: protocol: uniformize protocol errors 2021-10-14 21:22:52 +02:00
protocol.c MINOR: protocol: report the file and line number for binding/listening errors 2021-10-14 21:22:52 +02:00
proxy.c BUG/MINOR: proxy: Release ACLs and TCP/HTTP rules of default proxies 2021-10-15 14:33:35 +02:00
qpack-dec.c MINOR: qpack: fix memory leak on huffman decoding 2021-10-08 15:45:57 +02:00
qpack-enc.c MINOR: qpack: support non-indexed http status code encoding 2021-10-08 15:30:18 +02:00
qpack-tbl.c MINOR: qpack: fix wrong comment 2021-09-23 15:27:25 +02:00
queue.c BUG/MAJOR: queue: better protect a pendconn being picked from the proxy 2021-08-31 18:37:13 +02:00
quic_cc_newreno.c
quic_cc.c
quic_frame.c MINOR: quic: Constantness fixes for frame builders/parsers. 2021-09-23 15:27:25 +02:00
quic_sock.c BUG/MINOR: quic: fix includes for compilation 2021-10-08 15:59:02 +02:00
quic_tls.c MINOR: quic: Make QUIC-TLS support at least two initial salts 2021-09-23 15:27:25 +02:00
raw_sock.c CLEANUP: tree-wide: remove unneeded include time.h in ~20 files 2021-10-07 01:41:14 +02:00
regex.c
resolvers.c CLEANUP: resolvers: get rid of single-iteration loop in resolv_get_ip_from_response() 2021-10-22 08:34:14 +02:00
ring.c
sample.c MINOR: sample/arg: Be able to resolve args found in defaults sections 2021-10-15 14:12:19 +02:00
server_state.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
server.c MEDIUM: resolvers: remove the last occurrences of the "safe" argument 2021-10-20 17:54:27 +02:00
session.c MINOR: task: provide 3 task_new_* wrappers to simplify the API 2021-10-01 18:36:29 +02:00
sha1.c
shctx.c CLEANUP: shctx: remove the different inter-process locking techniques 2021-06-15 16:52:42 +02:00
signal.c
sink.c MINOR: task: provide 3 task_new_* wrappers to simplify the API 2021-10-01 18:36:29 +02:00
slz.c CLEANUP: slz: Mark reset_refs as static 2021-09-24 15:07:50 +02:00
sock_inet.c MEDIUM: listeners: split the thread mask between receiver and bind_conf 2021-10-14 21:27:48 +02:00
sock_unix.c MEDIUM: listeners: split the thread mask between receiver and bind_conf 2021-10-14 21:27:48 +02:00
sock.c MINOR: connection: add a new CO_FL_WANT_DRAIN flag to force drain on close 2021-10-21 21:48:23 +02:00
ssl_ckch.c BUILD: ssl_ckch: include ebpttree.h in ssl_ckch.c 2021-10-07 01:36:51 +02:00
ssl_crtlist.c
ssl_sample.c REORG: sample: move the crypto samples to ssl_sample.c 2021-10-07 01:41:14 +02:00
ssl_sock.c REORG: ssl-sock: move the sslconns/totalsslconns counters to global 2021-10-07 01:41:14 +02:00
ssl_utils.c MINOR: sample: Expose SSL captures using new fetchers 2021-08-26 19:48:34 +02:00
stats.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
stick_table.c MINOR: proxy: Introduce proxy flags to replace disabled bitfield 2021-10-15 14:12:19 +02:00
stream_interface.c CLEANUP: tree-wide: remove unneeded include time.h in ~20 files 2021-10-07 01:41:14 +02:00
stream.c MEDIUM: resolvers: remove the last occurrences of the "safe" argument 2021-10-20 17:54:27 +02:00
task.c BUG/MINOR: task: do not set TASK_F_USR1 for no reason 2021-10-21 16:17:29 +02:00
tcp_act.c Revert "MINOR: tcp-act: Add set-src/set-src-port for "tcp-request content" rules" 2021-07-06 11:44:04 +02:00
tcp_rules.c MEDIUM: tcp-rules: Eval TCP rules defined in defaults sections 2021-10-15 14:12:19 +02:00
tcp_sample.c BUILD: tcp_sample: include missing errors.h and session-t.h 2021-10-07 01:36:51 +02:00
tcpcheck.c BUG/MEDIUM: tcpcheck: Properly catch early HTTP parsing errors 2021-10-20 14:35:38 +02:00
thread.c MINOR: threads: add a new function to resolve config groups and masks 2021-10-08 17:22:26 +02:00
time.c REORG: time: move time-keeping code and variables to clock.c 2021-10-08 17:22:26 +02:00
tools.c MINOR: ssl: Add ssllib_name_startswith precondition 2021-10-13 11:28:08 +02:00
trace.c
uri_auth.c
uri_normalizer.c
vars.c BUG/MEDIUM: sample: Cumulate frontend and backend sample validity flags 2021-10-15 14:12:19 +02:00
version.c
wdt.c REORG: thread/sched: move the thread_info flags to the thread_ctx 2021-10-08 17:22:26 +02:00
xprt_handshake.c
xprt_quic.c MINOR: quic: Increase the size of handshake RX UDP datagrams 2021-10-22 15:48:19 +02:00