haproxy/include/common
Willy Tarreau 9faebe34cd MEDIUM: tools: improve time format error detection
As reported in GH issue #109 and in discourse issue
https://discourse.haproxy.org/t/haproxy-returns-408-or-504-error-when-timeout-client-value-is-every-25d
the time parser doesn't error on overflows nor underflows. This is a
recurring problem which additionally has the bad taste of taking a long
time before hitting the user.

This patch makes parse_time_err() return special error codes for overflows
and underflows, and adds the control in the call places to report suitable
errors depending on the requested unit. In practice, underflows are almost
never returned as the parsing function takes care of rounding values up,
so this might possibly happen on 64-bit overflows returning exactly zero
after rounding though. It is not really possible to cut the patch into
pieces as it changes the function's API, hence all callers.

Tests were run on about every relevant part (cookie maxlife/maxidle,
server inter, stats timeout, timeout*, cli's set timeout command,
tcp-request/response inspect-delay).
2019-06-07 19:32:02 +02:00
..
accept4.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
base64.h
buf.h MINOR: buffer: add a new buffer ring API to manipulate rings of buffers 2019-05-26 09:26:59 +02:00
buffer.h MEDIUM: buffers: relax the buffer lock a little bit 2019-05-28 17:25:21 +02:00
cfgparse.h MINOR: cfgparse: make the process/thread parser support a maximum value 2019-01-26 13:25:14 +01:00
chunk.h BUILD: chunk: properly declare pool_head_trash as extern 2019-03-29 21:03:20 +01:00
compat.h BUILD: signals: FreeBSD has SI_LWP instead of SI_TKILL 2019-05-23 08:40:50 +02:00
compiler.h MINOR: compiler: add a new macro ALREADY_CHECKED() 2018-12-08 15:27:03 +01:00
config.h MINOR: debug: Add an option that causes random allocation failures. 2019-01-31 19:38:25 +01:00
debug.h CLEANUP: debug: remove the TRACE() macro 2019-05-26 09:25:59 +02:00
defaults.h MINOR: config: continue to rely on DEFAULT_MAXCONN to set the minimum maxconn 2019-03-13 10:10:49 +01:00
epoll.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
errors.h
h1.h BUG/MEDIUM: h1: Don't parse chunks CRLF if not enough data are available 2019-04-19 15:53:23 +02:00
h2.h BUG/MEDIUM: h2/htx: Correctly handle interim responses when HTX is enabled 2019-02-19 16:26:14 +01:00
hash.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hathreads.h MINOR: dict: Add dictionary new data structure. 2019-06-05 08:33:35 +02:00
hpack-dec.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-enc.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-huff.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-tbl.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http-hdr.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http.h BUILD: do not specify "const" on functions returning structs or scalars 2019-04-15 21:55:48 +02:00
htx.h MINOR: htx: Don't use end-of-data blocks anymore 2019-06-05 10:12:11 +02:00
initcall.h MINOR: initcall: Don't forget to define the __start/stop_init_##stg symbols. 2019-04-10 16:33:25 +02:00
ist.h BUILD: ist: turn the lower/upper case tables to literal on obsolete linkers 2019-05-15 16:14:04 +02:00
istbuf.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
memory.h BUILD: threads: fix again the __ha_cas_dw() definition 2019-05-11 18:13:29 +02:00
mini-clist.h MINOR: lists: add LIST_ADDED() to check if an element belongs to a list 2019-05-13 19:14:52 +02:00
namespace.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
net_helper.h
openssl-compat.h CLEANUP: ssl: move all BIO_* definitions to openssl-compat 2019-05-11 17:39:08 +02:00
regex.h MEDIUM: regex: modify regex_comp() to atomically allocate/free the my_regex struct 2019-05-07 06:58:15 +02:00
splice.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
standard.h MEDIUM: tools: improve time format error detection 2019-06-07 19:32:02 +02:00
syscall.h
template.h
ticks.h
time.h CLEANUP: time: refine the test on _POSIX_TIMERS 2019-05-21 20:03:03 +02:00
tools.h
uri_auth.h
version.h BUILD: add a new file "version.c" to carry version updates 2019-01-04 18:20:32 +01:00
xref.h MEDIUM: xref: Use the new _HA_ATOMIC_* macros. 2019-03-11 17:02:37 +01:00