haproxy/src
Willy Tarreau 85cb0aecf5 BUG/MEDIUM: stream: properly set the required HTTP analysers on use-service
Commit 4850e51 ("BUG/MAJOR: lua: Do not force the HTTP analysers in
use-services") fixed a bug in how services are used in Lua, but this
fix broke the ability for Lua services to support keep-alive.

The cause is that we branch to a service while we have not yet set the
body analysers on the request nor the response, and when we start to
deal with the response we don't have any request analyser anymore. This
leads the response forward engine to detect an error and abort. It's
very likely that this also causes some random truncation of responses
though this has not been observed during the tests.

The root cause is not the Lua part in fact, the commit above was correct,
the problem is the implementation of the "use-service" action. When done
in an HTTP request, it bypasses the load balancing decisions and the
connect() phase. These ones are normally the ones preparing the request
analysers to parse the body when keep-alive is set. This should be dealt
with in the main process_use_service() function in fact.

That's what this patch does. If process_use_service() is called from the
http-request rule set, it enables the XFER_BODY analyser on the request
(since the same is always set on the response). Note that it's exactly
what is being done on the stats page which properly supports keep-alive
and compression.

This fix must be backported to 1.7 and 1.6 as the breakage appeared in 1.6.3.
2017-08-23 16:11:38 +02:00
..
51d.c CLEANUP: 51d: move global settings out of the global section 2016-12-21 21:30:54 +01:00
acl.c BUG/MEDIUM: map/acl: fix unwanted flags inheritance. 2017-07-04 10:45:53 +02:00
applet.c MAJOR: applet: applet scheduler rework. 2017-06-27 14:38:02 +02:00
arg.c BUG/MEDIUM: arg: ensure that we properly unlink unresolved arguments on error 2017-04-13 12:20:52 +02:00
auth.c CLEANUP: auth: use the build options list to report its support 2016-12-21 21:30:54 +01:00
backend.c MINOR: backends: Change get_server_sh/get_server_uh into private function 2017-06-27 14:38:02 +02:00
base64.c [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.c CLEANUP: buffers: Remove buffer_bounce_realign function 2017-03-31 14:38:22 +02:00
cfgparse.c BUG/MEDIUM: dns: fix accepted_payload_size parser to avoid integer overflow 2017-08-22 12:03:46 +02:00
channel.c BUG/MEDIUM: buffers: Fix how input/output data are injected into buffers 2017-03-31 14:36:04 +02:00
checks.c MINOR: check: Fix checks when using SRV records. 2017-08-09 16:32:50 +02:00
chunk.c MINOR: chunks: implement a simple dynamic allocator for trash buffers 2017-02-08 11:16:29 +01:00
cli.c BUILD/MINOR: cli: shut a minor gcc warning in "show fd" 2017-08-09 16:35:44 +02:00
compression.c MINOR: compression: fix -vv output without zlib/slz 2017-01-11 16:11:11 +01:00
connection.c MINOR: connection: send data before receiving 2017-06-27 14:38:02 +02:00
da.c CLEANUP: da: move global settings out of the global section 2016-12-21 21:30:54 +01:00
dns.c BUG/MINOR: dns: wrong resolution interval lead to 100% CPU 2017-08-22 11:40:00 +02:00
ev_epoll.c MINOR: fd: add a new flag HAP_POLL_F_RDHUP to struct poller 2017-03-21 16:30:35 +01:00
ev_kqueue.c MEDIUM: kqueue: only set FD_POLL_IN when there are pending data 2017-03-21 16:35:17 +01:00
ev_poll.c OPTIM: poll: enable support for POLLRDHUP 2017-03-21 16:30:44 +01:00
ev_select.c MINOR: fd: add a new flag HAP_POLL_F_RDHUP to struct poller 2017-03-21 16:30:35 +01:00
fd.c MINOR: proxy: Don't close FDs if not our proxy. 2017-04-13 19:15:17 +02:00
filters.c BUG/MEDIUM: filters: Be sure to call flt_end_analyze for both channels 2017-07-06 23:07:36 +02:00
flt_http_comp.c MINOR: compression: Use a memory pool to allocate compression states 2017-06-30 14:05:29 +02:00
flt_spoe.c BUG/MINOR: Wrong type used as argument for spoe_decode_buffer(). 2017-08-22 11:27:20 +02:00
flt_trace.c MINOR: filters: Add check_timeouts callback to handle timers expiration on streams 2016-11-21 15:29:58 +01:00
freq_ctr.c BUG/MINOR: time: frequency counters are not totally accurate 2012-12-29 21:50:07 +01:00
frontend.c BUG/MAJOR: frontend: don't dereference a null conn on outgoing connections 2017-06-27 15:47:56 +02:00
haproxy.c MINOR: init: Fix CPU affinity setting on FreeBSD. 2017-08-17 18:39:52 +02:00
hash.c MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
hdr_idx.c OPTIM/MINOR: move the hdr_idx pools out of the proxy struct 2011-10-24 18:15:04 +02:00
hlua.c MINOR: lua: properly process the contents of the content-length field 2017-08-23 16:11:38 +02:00
hlua_fcn.c BUG/MINOR: lua: Fix bitwise logic for hlua_server_check_* functions. 2017-07-28 15:24:57 +02:00
i386-linux-vsys.c MEDIUM: listener: add support for linux's accept4() syscall 2012-10-08 20:11:03 +02:00
lb_chash.c BUG/MINOR: hash-balance-factor isn't effective in certain circumstances 2017-04-26 15:45:27 +02:00
lb_fas.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwlc.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwrr.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_map.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00
listener.c MEDIUM: mworker: replace systemd mode by master worker mode 2017-06-02 10:56:32 +02:00
log.c BUG/MINOR: log: pin the front connection when front ip/ports are logged 2017-06-23 11:34:57 +02:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c MEDIUM: Add parsing of mailers section 2015-02-03 00:24:16 +01:00
map.c BUG/MAJOR: map: fix segfault during 'show map/acl' on cli. 2017-06-30 06:49:42 +02:00
memory.c MINOR: memory: remove macros 2017-07-21 09:54:03 +02:00
namespace.c CLEANUP: namespaces: use the build options list to report it 2016-12-21 21:30:54 +01:00
pattern.c BUG/MEDIUM: map/acl: fix unwanted flags inheritance. 2017-07-04 10:45:53 +02:00
payload.c BUG: payload: fix payload not retrieving arbitrary lengths 2017-03-20 07:25:37 +01:00
peers.c MINOR: stream: link the stream to its session 2017-08-18 13:26:35 +02:00
pipe.c BUILD/MINOR: silent a build warning in src/pipe.c (fcntl) 2011-10-24 17:09:22 +02:00
proto_http.c MINOR: http: export some of the HTTP parser macros 2017-08-18 13:38:47 +02:00
proto_tcp.c MINOR: tcp: When binding socket, attempt to reuse one from the old proc. 2017-04-13 19:15:17 +02:00
proto_udp.c CLEANUP: fix inconsistency between fd->iocb, proto->accept and accept() 2016-04-14 11:18:22 +02:00
proto_uxst.c BUG/MEDIUM: unix: never unlink a unix socket from the file system 2017-06-16 10:34:20 +02:00
protocol.c BUILD: protocol: fix some build errors on OpenBSD 2016-08-10 19:31:58 +02:00
proxy.c MINOR: dns: Handle SRV records. 2017-08-09 16:32:49 +02:00
queue.c MINOR: queue: Change pendconn_from_srv/pendconn_from_px into private functions 2017-06-27 14:38:02 +02:00
raw_sock.c CLEANUP: raw_sock: Use a better name for the constructor than __ssl_sock_deinit() 2017-08-17 18:33:21 +02:00
rbtree.c [MINOR] imported the rbtree function from Linux kernel 2007-01-07 02:12:57 +01:00
regex.c MEDIUM: regex: pcre2 support 2016-12-28 12:51:51 +01:00
sample.c MINOR: samples: Handle the type SMP_T_METH when we duplicate a sample in smp_dup 2017-07-24 17:15:47 +02:00
server.c BUG/MINOR: dns: server set by SRV records stay in "no resolution" status 2017-08-22 11:34:49 +02:00
session.c MEDIUM: session: do not free a session until no stream references it 2017-08-18 13:26:35 +02:00
shctx.c MEDIUM: ssl: Add support for OpenSSL 1.1.0 2016-11-08 20:54:41 +01:00
signal.c MEDIUM: mworker: handle reload and signals 2017-06-02 10:56:32 +02:00
ssl_sock.c BUILD: ssl: replace SSL_CTX_get0_privatekey for openssl < 1.0.2 2017-08-11 11:35:26 +02:00
standard.c MINOR: tools: add a portable timegm() alternative 2017-07-19 19:15:06 +02:00
stats.c MINOR: cli: add ACCESS_LVL_MASK to store the access level 2017-05-27 07:02:06 +02:00
stick_table.c CLEANUP: task: remove all initializations to TICK_ETERNITY after task_new() 2017-07-24 17:55:20 +02:00
stream.c BUG/MEDIUM: stream: properly set the required HTTP analysers on use-service 2017-08-23 16:11:38 +02:00
stream_interface.c BUG/MAJOR: applet: fix a freeze if data is immedately forwarded. 2017-06-30 14:57:24 +02:00
task.c MAJOR: task: task scheduler rework. 2017-06-27 14:38:02 +02:00
tcp_rules.c MINOR: tcp-rules: check that the listener exists before updating its counters 2016-12-22 23:26:37 +01:00
time.c CLEANUP: time: curr_sec_ms doesn't need to be exported 2017-03-29 15:24:33 +02:00
trace.c BUG/MEDIUM: trace.c: rdtsc() is defined in two files 2016-04-09 22:27:01 +02:00
uri_auth.c CLEANUP: uniformize last argument of malloc/calloc 2016-04-03 14:17:42 +02:00
vars.c MINOR: samples: Don't allocate memory for SMP_T_METH sample when method is known 2017-07-24 17:16:11 +02:00
wurfl.c CLEANUP: wurfl: move global settings out of the global section 2016-12-21 21:30:54 +01:00
xxhash.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00