]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
14 years ago[BUG] http: correctly update the header list when removing two consecutive headers
Willy Tarreau [Sun, 28 Nov 2010 05:57:24 +0000 (06:57 +0100)] 
[BUG] http: correctly update the header list when removing two consecutive headers

When a header is removed, the previous header's next pointer is updated
to reflect the next of the current header. However, when cycling through
the loop, we update the prev pointer to point to the deleted header, which
means that if we delete another header, it's the deleted header's next
pointer that will be updated, leaving the deleted header in the list with
a null length, which is forbidden.

We must just not update the prev pointer after a removal.

This bug was present when either "reqdel" and "rspdel" removed two consecutive
headers. It could also occur when removing cookies in either requests or
responses, but since headers were the last header processing, the issue
remained unnoticed.

Issue reported by Hank A. Paulson.

This fix must be ported to 1.4 and possibly 1.3.

14 years ago[CRITICAL] cookies: mixing cookies in indirect mode and appsession can crash the...
Willy Tarreau [Wed, 24 Nov 2010 17:31:28 +0000 (18:31 +0100)] 
[CRITICAL] cookies: mixing cookies in indirect mode and appsession can crash the process

Cookies in indirect mode are removed from the cookie header. Three pointers
ought to be updated when appsession cookies are processed next, but were not.
The result is that a memcpy() can be called with a negative value causing the
process to crash. It is not sure whether this can be remotely exploited or not.
(cherry picked from commit c5f3749aa3ccfdebc4992854ea79823d26f66213)

14 years ago[BUG] appsession: fix possible double free in case of out of memory
Willy Tarreau [Fri, 19 Nov 2010 10:29:06 +0000 (11:29 +0100)] 
[BUG] appsession: fix possible double free in case of out of memory

In out of memory conditions, the ->destroy function would free all
possibly allocated pools from the current appsession, including those
that were not yet allocated nor assigned, which used to point to a
previous allocation, obviously resulting in a segfault.
(cherry picked from commit 75eae485921d3a6ce197915c769673834ecbfa5c)

14 years ago[BUG] capture: do not capture a cookie if there is no memory left
Willy Tarreau [Fri, 19 Nov 2010 10:27:18 +0000 (11:27 +0100)] 
[BUG] capture: do not capture a cookie if there is no memory left

In case of out of memory, it was possible to write to a null pointer
when capturing response cookies due to a missing "else" block. The
request handling was fine though.
(cherry picked from commit 62e3604d7dd27741c0b4c9e27d9e7c73495dfc32)

14 years ago[BUG] debug: report the correct poller list in verbose mode
Willy Tarreau [Fri, 19 Nov 2010 09:20:36 +0000 (10:20 +0100)] 
[BUG] debug: report the correct poller list in verbose mode

When running with -vv or -V -d, the list of usable polling systems
is reported. The final selection did not take into account the
possible failures during the tests, which is misleading and could
make one think that a non-working poller will be used, while it is
not the case. Fix that to really report the correct ones.
(cherry picked from commit 6d0e354e0171f08b7b3868ad2882c3663bd068a7)

14 years ago[CLEANUP] unix sockets : move create_uxst_socket() in uxst_bind_listener()
Cyril Bonté [Sun, 14 Nov 2010 16:03:19 +0000 (17:03 +0100)] 
[CLEANUP] unix sockets : move create_uxst_socket() in uxst_bind_listener()

The code of create_uxst_socket() is moved in uxst_bind_listener() so that we
don't need to pass a lot of parameters, as it was only called there.

14 years ago[MINOR] unix sockets : inherits the backlog size from the listener
Cyril Bonté [Sun, 14 Nov 2010 16:03:18 +0000 (17:03 +0100)] 
[MINOR] unix sockets : inherits the backlog size from the listener

Since unix sockets are supported for bind, the default backlog size was not
enough to accept the traffic. The size is now inherited from the listener
to behave like the tcp listeners.

This also affects the "stats socket" backlog, which is now determined by
"stats maxconn".

14 years ago[OPTIM] linux: add support for bypassing libc to force using vsyscalls
Willy Tarreau [Sun, 14 Nov 2010 16:09:33 +0000 (17:09 +0100)] 
[OPTIM] linux: add support for bypassing libc to force using vsyscalls

Some distros' libc are built for CPUs earlier than i686 and as such do
not offer support for Linux kernel's faster vsyscalls. This code adds
a new build option USE_VSYSCALLS to bypass libc for most commonly used
system calls. A net gain of about 10% can be observed with this change
alone.

It only works when /proc/sys/abi/vsyscall32 equals exactly 2. When it's
set to 1, the VDSO is randomized and cannot be used.

14 years ago[BUILD] pattern: use 'int' instead of 'int32_t'
Willy Tarreau [Sun, 14 Nov 2010 13:24:27 +0000 (14:24 +0100)] 
[BUILD] pattern: use 'int' instead of 'int32_t'

Ross West reported that int32_t breaks compilation on FreeBSD. Since an
int is 32-bit on all supported platforms and we already rely on that,
change the type.

14 years ago[DOC] update ROADMAP file
Willy Tarreau [Sun, 14 Nov 2010 13:23:22 +0000 (14:23 +0100)] 
[DOC] update ROADMAP file

move what was done and add a few collected wishes.

14 years ago[RELEASE] Released version 1.5-dev3
Willy Tarreau [Thu, 11 Nov 2010 22:29:35 +0000 (23:29 +0100)] 
[RELEASE] Released version 1.5-dev3

Released version 1.5-dev3 with the following main changes :
    - [DOC] fix http-request documentation
    - [MEDIUM] enable/disable servers from the stats web interface
    - [MEDIUM] stats: add an admin level
    - [DOC] stats: document the "stats admin" statement
    - [MINOR] startup: print the proxy socket which caused an error
    - [CLEANUP] Remove unneeded chars allocation
    - [MINOR] config: detect options not supported due to compilation options
    - [MINOR] Add pattern's fetchs payload and payload_lv
    - [MINOR] frontend: improve accept-proxy header parsing
    - [MINOR] frontend: add tcpv6 support on accept-proxy bind
    - [MEDIUM] Enhance message errors management on binds
    - [MINOR] Manage unix socket source field on logs
    - [MINOR] Manage unix socket source field on session dump on sock stats
    - [MINOR] Support of unix listener sockets for debug and log event messages on frontend.c
    - [MINOR] Add some tests on sockets family for port remapping and mode transparent.
    - [MINOR] Manage socket type unix for some logs
    - [MINOR] Enhance controls of socket's family on acls and pattern fetch
    - [MINOR] Support listener's sockets unix on http logs.
    - [MEDIUM] Add supports of bind on unix sockets.
    - [BUG] stick table purge failure if size less than 255
    - [BUG] stick table entries expire on counters updates/read or show table, even if there is no "expire" parameter
    - [MEDIUM] Implement tcp inspect response rules
    - [DOC] tcp-response content and inspect
    - [MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type
    - [DOC] acls rep_ssl_hello and req_ssl_hello
    - [MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy if data from protected areas need to be manipulated.
    - [DOC] new type binary in stick-table
    - [DOC] stick store-response and new patterns payload and payload_lv
    - [MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command
    - [MEDIUM] Create updates tree on stick table to manage sync.
    - [MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h for sync stick table management
    - [MEDIUM] Manage peers section parsing and stick table registration on peers.
    - [MEDIUM] Manage soft stop on peers proxy
    - [DOC] add documentation for peers section
    - [MINOR] checks: add support for LDAPv3 health checks
    - [MINOR] add better support to "mysql-check"
    - [BUG] Restore info about available active/backup servers
    - [CONTRIB] Update haproxy.pl
    - [CONTRIB] Update Cacti Tempates
    - [CONTRIB] add templates for Cacti.
    - [BUG] http: don't consider commas as a header delimitor within quotes
    - [MINOR] support a global jobs counter
    - [DOC] add a summary about cookie incompatibilities between specs and browsers
    - [DOC] fix description of cookie "insert" and "indirect" modes
    - [MEDIUM] http: fix space handling in the request cookie parser
    - [MEDIUM] http: fix space handling in the response cookie parser
    - [DOC] fix typo in the queue() definition (backend, not frontend)
    - [BUG] deinit: unbind listeners before freeing them
    - [BUG] stream_interface: only call si->release when both dirs are closed
    - [MEDIUM] buffers: rework the functions to exchange between SI and buffers
    - [DOC] fix typo in the avg_queue() and be_conn() definition (backend, not frontend)
    - [MINOR] halog: add '-tc' to sort by termination codes
    - [MINOR] halog: skip non-traffic logs for -st and -tc
    - [BUG] stream_sock: cleanly disable the listener in case of resource shortage
    - [BUILD] stream_sock: previous fix lacked the #include, causing a warning.
    - [DOC] bind option is "defer-accept", not "defer_accept"
    - [DOC] missing index entry for http-check send-state
    - [DOC] tcp-request inspect-delay is for backends too
    - [BUG] ebtree: string_equal_bits() could return garbage on identical strings
    - [BUG] stream_sock: try to flush any extra pending request data after a POST
    - [BUILD] proto_http: eliminate some build warnings with gcc-2.95
    - [MEDIUM] make it possible to combine http-pretend-keepalived with httpclose
    - [MEDIUM] tcp-request : don't wait for inspect-delay to expire when the buffer is full
    - [MEDIUM] checks: add support for HTTP contents lookup
    - [TESTS] add test-check-expect to test various http-check methods
    - [MINOR] global: add "tune.chksize" to change the default check buffer size
    - [MINOR] cookie: add options "maxidle" and "maxlife"
    - [MEDIUM] cookie: support client cookies with some contents appended to their value
    - [MINOR] http: make some room in the transaction flags to extend cookies
    - [MINOR] cookie: add the expired (E) and old (O) flags for request cookies
    - [MEDIUM] cookie: reassign set-cookie status flags to store more states
    - [MINOR] add encode/decode function for 30-bit integers from/to base64
    - [MEDIUM] cookie: check for maxidle and maxlife for incoming dated cookies
    - [MEDIUM] cookie: set the date in the cookie if needed
    - [DOC] document the cookie maxidle and maxlife parameters
    - [BUG] checks: don't log backend down for all zero-weight servers
    - [MEDIUM] checks: set server state to one state from failure when leaving maintenance
    - [BUG] config: report correct keywords for "observe"
    - [MINOR] checks: ensure that we can inherit binary checks from the defaults section
    - [MINOR] acl: add the http_req_first match
    - [DOC] fix typos about bind-process syntax
    - [BUG] cookie: correctly unset default cookie parameters
    - [MINOR] cookie: add support for the "preserve" option
    - [BUG] ebtree: fix duplicate strings insertion
    - [CONTRIB] halog: report per-url counts, errors and times
    - [CONTRIB] halog: minor speed improvement in timer parser
    - [MINOR] buffers: add a new request analyser flag for PROXY mode
    - [MINOR] listener: add the "accept-proxy" option to the "bind" keyword
    - [MINOR] standard: add read_uint() to parse a delimited unsigned integer
    - [MINOR] standard: change arg type from const char* to char*
    - [MINOR] frontend: add a new analyser to parse a proxied connection
    - [MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections
    - [DOC] add the proxy protocol's specifications
    - [DOC] document the 'accept-proxy' bind option
    - [MINOR] cfgparse: report support of <path> for the 'bind' statements
    - [DOC] add references to unix socket handling
    - [MINOR] move MAXPATHLEN definition to compat.h
    - [MEDIUM] unix sockets: cleanup the error reporting path
    - [BUG] session: don't stop forwarding of data upon last packet
    - [CLEANUP] accept: replace some inappropriate Alert() calls with send_log()
    - [BUILD] peers: shut a printf format warning (key_size is a size_t)
    - [BUG] accept: don't close twice upon error
    - [OPTIM] session: don't recheck analysers when buffer flags have not changed
    - [OPTIM] stream_sock: don't clear FDs that are already cleared
    - [BUG] proto_tcp: potential bug on pattern fetch dst and dport

14 years ago[OPTIM] stream_sock: don't clear FDs that are already cleared
Willy Tarreau [Thu, 11 Nov 2010 22:08:17 +0000 (23:08 +0100)] 
[OPTIM] stream_sock: don't clear FDs that are already cleared

We can on average two calls to __fd_clr() per session by avoiding to
call it unnecessarily.

14 years ago[OPTIM] session: don't recheck analysers when buffer flags have not changed
Willy Tarreau [Thu, 11 Nov 2010 13:28:47 +0000 (14:28 +0100)] 
[OPTIM] session: don't recheck analysers when buffer flags have not changed

Analysers were re-evaluated when some flags were still present in the
buffers, even if they had not changed since previous pass, resulting
in a waste of CPU cycles.

Ensuring that the flags have changed has saved some useless calls :

  function            min calls per session (before -> after)

  http_request_forward_body       5 -> 4
  http_response_forward_body      3 -> 2
  http_sync_req_state            10 -> 8
  http_sync_res_state             8 -> 6
  http_resync_states              8 -> 6

14 years ago[BUG] accept: don't close twice upon error
Willy Tarreau [Thu, 11 Nov 2010 09:56:04 +0000 (10:56 +0100)] 
[BUG] accept: don't close twice upon error

The stream_sock's accept() used to close the FD upon error, but this
was also sometimes performed by the frontend's accept() called via the
session's accept(). Those interlaced calls were also responsible for the
spaghetti-looking error unrolling code in session.c and stream_sock.c.

Now the frontend must not close the FD anymore, the session is responsible
for that. It also takes care of just closing the FD or also removing from
the FD lists, depending on its state. The socket-level accept() does not
have to care about that anymore.

14 years ago[BUILD] peers: shut a printf format warning (key_size is a size_t)
Willy Tarreau [Thu, 11 Nov 2010 09:55:09 +0000 (10:55 +0100)] 
[BUILD] peers: shut a printf format warning (key_size is a size_t)

Also fix a few misleading comments.

14 years ago[CLEANUP] accept: replace some inappropriate Alert() calls with send_log()
Willy Tarreau [Thu, 11 Nov 2010 08:48:16 +0000 (09:48 +0100)] 
[CLEANUP] accept: replace some inappropriate Alert() calls with send_log()

Some Alert() messages were remaining in the accept() path, which they
would have no chance to be detected. Remove some of them (the impossible
ones) and replace the relevant ones with send_log() so that the admin
has a chance to catch them.

14 years ago[DOC] add documentation for peers section
Emeric Brun [Mon, 27 Sep 2010 10:05:28 +0000 (12:05 +0200)] 
[DOC] add documentation for peers section

14 years ago[MEDIUM] Manage soft stop on peers proxy
Emeric Brun [Thu, 23 Sep 2010 16:44:36 +0000 (18:44 +0200)] 
[MEDIUM] Manage soft stop on peers proxy

14 years ago[MEDIUM] Manage peers section parsing and stick table registration on peers.
Emeric Brun [Thu, 23 Sep 2010 16:39:19 +0000 (18:39 +0200)] 
[MEDIUM] Manage peers section parsing and stick table registration on peers.

14 years ago[MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h...
Emeric Brun [Thu, 23 Sep 2010 16:30:22 +0000 (18:30 +0200)] 
[MAJOR] Add new files src/peer.c, include/proto/peers.h and include/types/peers.h for sync stick table management

Add cmdline option -L to configure local peer name

14 years ago[MEDIUM] Create updates tree on stick table to manage sync.
Emeric Brun [Thu, 23 Sep 2010 16:16:52 +0000 (18:16 +0200)] 
[MEDIUM] Create updates tree on stick table to manage sync.

14 years ago[MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command
Emeric Brun [Thu, 23 Sep 2010 16:12:53 +0000 (18:12 +0200)] 
[MINOR] Manage all types (ip, integer, string, binary) on cli "show table" command

14 years ago[DOC] stick store-response and new patterns payload and payload_lv
Emeric Brun [Fri, 24 Sep 2010 16:15:17 +0000 (18:15 +0200)] 
[DOC] stick store-response and new patterns payload and payload_lv

14 years ago[MINOR] Add pattern's fetchs payload and payload_lv
Emeric [Fri, 5 Nov 2010 17:13:50 +0000 (18:13 +0100)] 
[MINOR] Add pattern's fetchs payload and payload_lv

14 years ago[DOC] new type binary in stick-table
Emeric Brun [Fri, 24 Sep 2010 14:34:28 +0000 (16:34 +0200)] 
[DOC] new type binary in stick-table

14 years ago[MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy...
Emeric Brun [Thu, 23 Sep 2010 16:02:19 +0000 (18:02 +0200)] 
[MEDIUM] Create new protected pattern types CONSTSTRING and CONSTDATA to force memcpy if data from protected areas need to be manipulated.

Enhance pattern convs and fetch argument parsing, now fetchs and convs callbacks used typed args.
Add more details on error messages on parsing pattern expression function.
Update existing pattern convs and fetchs to new proto.
Create stick table key type "binary".
Manage Truncation and padding if pattern's fetch-converted result don't match table key size.

14 years ago[DOC] acls rep_ssl_hello and req_ssl_hello
Emeric Brun [Fri, 24 Sep 2010 13:45:16 +0000 (15:45 +0200)] 
[DOC] acls rep_ssl_hello and req_ssl_hello

14 years ago[MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type
Emeric Brun [Thu, 23 Sep 2010 15:59:18 +0000 (17:59 +0200)] 
[MINOR] new acls fetch req_ssl_hello_type and rep_ssl_hello_type

14 years ago[DOC] tcp-response content and inspect
Emeric Brun [Fri, 24 Sep 2010 13:34:53 +0000 (15:34 +0200)] 
[DOC] tcp-response content and inspect

14 years ago[MEDIUM] Implement tcp inspect response rules
Emeric Brun [Thu, 23 Sep 2010 15:56:44 +0000 (17:56 +0200)] 
[MEDIUM] Implement tcp inspect response rules

14 years ago[BUG] stick table entries expire on counters updates/read or show table, even if...
Emeric Brun [Thu, 23 Sep 2010 16:11:05 +0000 (18:11 +0200)] 
[BUG] stick table entries expire on counters updates/read or show table, even if there is no "expire" parameter

14 years ago[BUG] stick table purge failure if size less than 255
Emeric Brun [Thu, 23 Sep 2010 16:10:00 +0000 (18:10 +0200)] 
[BUG] stick table purge failure if size less than 255

If table size is lower than 256, we can't force to purge old entries.
This patch should be backported to 1.4.

14 years ago[BUG] session: don't stop forwarding of data upon last packet
Willy Tarreau [Sun, 7 Nov 2010 19:26:56 +0000 (20:26 +0100)] 
[BUG] session: don't stop forwarding of data upon last packet

If a read shutdown is encountered on the first packet of a connection
right after the data and the last analyser is unplugged at the same
time, then that last data chunk may never be forwarded. In practice,
right now it cannot happen on requests due to the way they're scheduled,
nor can it happen on responses due to the way their analysers work.

But this behaviour has been observed with new response analysers being
developped.

The reason is that when the read shutdown is encountered and an analyser
is present, data cannot be forwarded but the BF_SHUTW_NOW flag is set.
After that, the analyser gets called and unplugs itself, hoping that
process_session() will automatically forward the data. This does not
happen due to BF_SHUTW_NOW.

Simply removing the test on this flag is not enough because then aborted
requests still get forwarded, due to the forwarding code undoing the
abort.

The solution here consists in checking BF_SHUTR_NOW instead of BF_SHUTW_NOW.
BF_SHUTR_NOW is only set on aborts and remains set until ->shutr() is called.
This is enough to catch recent aborts but not prevent forwarding in other
cases. Maybe a new special buffer flag "BF_ABORT" might be desirable in the
future.

This patch does not need to be backported because older versions don't
have the analyser which make the problem appear.

14 years ago[MINOR] config: detect options not supported due to compilation options
Cyril Bonté [Mon, 1 Nov 2010 18:26:00 +0000 (19:26 +0100)] 
[MINOR] config: detect options not supported due to compilation options

Some options depends on the target architecture or compilation options.
When such an option is used on a compiled version that doesn't support it,
it's probably better to identify it as an unsupported option due to
compilation options instead of an unknown option.

Edit: better check on the empty capability than on the option bits. -Willy

14 years ago[CLEANUP] Remove unneeded chars allocation
Cyril Bonté [Mon, 1 Nov 2010 18:26:02 +0000 (19:26 +0100)] 
[CLEANUP] Remove unneeded chars allocation

Some arrays used to log addresses add some more bytes for ports but this space
is never used.

14 years ago[MEDIUM] unix sockets: cleanup the error reporting path
Willy Tarreau [Sun, 7 Nov 2010 11:10:51 +0000 (12:10 +0100)] 
[MEDIUM] unix sockets: cleanup the error reporting path

There were a lot of snprintf() everywhere in the UNIX bind code. Now we
proceed as for tcp and indicate the socket path at the end between square
brackets. The code is smaller and more readable.

14 years ago[MINOR] startup: print the proxy socket which caused an error
Cyril Bonté [Mon, 1 Nov 2010 18:26:01 +0000 (19:26 +0100)] 
[MINOR] startup: print the proxy socket which caused an error

Add the address and port to the error message of the proxy socket that caused
the error. This can be helpful when several listening addresses are used in a
proxy.

Edit: since we now also support unix sockets (which already report their
      path), better move the address reporting to proto_tcp.c by analogy.
      -Willy

14 years ago[MINOR] move MAXPATHLEN definition to compat.h
Willy Tarreau [Sun, 7 Nov 2010 10:44:13 +0000 (11:44 +0100)] 
[MINOR] move MAXPATHLEN definition to compat.h

MAXPATHLEN may be used at other places, it's unconvenient to have it
redefined in a few files. Also, since checking it requires including
sys/param.h, some versions of it cause a macro declaration conflict
with MIN/MAX which are defined in tools.h. The solution consists in
including sys/param.h in both files so that we ensure it's loaded
before the macros are defined and MAXPATHLEN is checked.

14 years ago[DOC] add references to unix socket handling
Willy Tarreau [Tue, 9 Nov 2010 11:46:41 +0000 (12:46 +0100)] 
[DOC] add references to unix socket handling

UNIX listening sockets have some additional options and may log slightly
differently.

14 years ago[MINOR] cfgparse: report support of <path> for the 'bind' statements
Willy Tarreau [Tue, 9 Nov 2010 08:50:37 +0000 (09:50 +0100)] 
[MINOR] cfgparse: report support of <path> for the 'bind' statements

"bind" now supports unix sockets, so report that in the error message.

14 years ago[MEDIUM] Add supports of bind on unix sockets.
Emeric Brun [Fri, 22 Oct 2010 15:59:25 +0000 (17:59 +0200)] 
[MEDIUM] Add supports of bind on unix sockets.

14 years ago[MINOR] Support listener's sockets unix on http logs.
Emeric Brun [Fri, 22 Oct 2010 15:23:04 +0000 (17:23 +0200)] 
[MINOR] Support listener's sockets unix on http logs.

Enhance controls of sockets family on X-Forwarded-For and X-Original-To insert

14 years ago[MINOR] Enhance controls of socket's family on acls and pattern fetch
Emeric Brun [Fri, 22 Oct 2010 15:14:01 +0000 (17:14 +0200)] 
[MINOR] Enhance controls of socket's family on acls and pattern fetch

14 years ago[MINOR] Manage socket type unix for some logs
Emeric Brun [Fri, 22 Oct 2010 15:42:55 +0000 (17:42 +0200)] 
[MINOR] Manage socket type unix for some logs

14 years ago[MINOR] Add some tests on sockets family for port remapping and mode transparent.
Emeric Brun [Fri, 22 Oct 2010 14:36:33 +0000 (16:36 +0200)] 
[MINOR] Add some tests on sockets family for port remapping and mode transparent.

14 years ago[MINOR] Support of unix listener sockets for debug and log event messages on frontend.c
Emeric Brun [Fri, 22 Oct 2010 14:33:18 +0000 (16:33 +0200)] 
[MINOR] Support of unix listener sockets for debug and log event messages on frontend.c

14 years ago[MINOR] Manage unix socket source field on session dump on sock stats
Emeric Brun [Fri, 22 Oct 2010 14:19:01 +0000 (16:19 +0200)] 
[MINOR] Manage unix socket source field on session dump on sock stats

14 years ago[MINOR] Manage unix socket source field on logs
Emeric Brun [Fri, 22 Oct 2010 14:14:31 +0000 (16:14 +0200)] 
[MINOR] Manage unix socket source field on logs

14 years ago[MEDIUM] Enhance message errors management on binds
Emeric Brun [Fri, 22 Oct 2010 14:06:11 +0000 (16:06 +0200)] 
[MEDIUM] Enhance message errors management on binds

14 years ago[DOC] document the 'accept-proxy' bind option
Willy Tarreau [Fri, 29 Oct 2010 19:56:16 +0000 (21:56 +0200)] 
[DOC] document the 'accept-proxy' bind option

This option enables the PROXY protocol over incoming connections.

14 years ago[DOC] add the proxy protocol's specifications
Willy Tarreau [Fri, 29 Oct 2010 19:46:16 +0000 (21:46 +0200)] 
[DOC] add the proxy protocol's specifications

14 years ago[MINOR] frontend: add tcpv6 support on accept-proxy bind
Emeric Brun [Fri, 29 Oct 2010 10:03:03 +0000 (12:03 +0200)] 
[MINOR] frontend: add tcpv6 support on accept-proxy bind

14 years ago[MINOR] frontend: improve accept-proxy header parsing
Emeric Brun [Fri, 29 Oct 2010 13:16:55 +0000 (15:16 +0200)] 
[MINOR] frontend: improve accept-proxy header parsing

The accept-proxy now automatically fails as soon as a character does not
match the expected syntax.

14 years ago[MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections
Willy Tarreau [Fri, 15 Oct 2010 21:25:20 +0000 (23:25 +0200)] 
[MEDIUM] session: call the frontend_decode_proxy analyser on proxied connections

This analyser must absolutely be the earliest one to process contents, given
the nature of the protocol.

14 years ago[MINOR] frontend: add a new analyser to parse a proxied connection
Willy Tarreau [Fri, 15 Oct 2010 21:23:19 +0000 (23:23 +0200)] 
[MINOR] frontend: add a new analyser to parse a proxied connection

The introduction of a new PROXY protocol for proxied connections requires
an early analyser to decode the incoming connection and set the session
flags accordingly.

Some more work is needed, among which setting a flag on the session to
indicate it's proxied, and copying the original parameters for later
comparisons with new ACLs (eg: real_src, ...).

14 years ago[MINOR] standard: change arg type from const char* to char*
Willy Tarreau [Fri, 15 Oct 2010 21:21:42 +0000 (23:21 +0200)] 
[MINOR] standard: change arg type from const char* to char*

inetaddr_host_lim_ret() used to make use of const char** for some
args, but that make it impossible ot use char** due to the way
controls are made by gcc. So let's change that.

14 years ago[MINOR] standard: add read_uint() to parse a delimited unsigned integer
Willy Tarreau [Fri, 15 Oct 2010 21:19:55 +0000 (23:19 +0200)] 
[MINOR] standard: add read_uint() to parse a delimited unsigned integer

This function parses an integer and returns it along with the pointer to the
next char not part of the number.

14 years ago[MINOR] listener: add the "accept-proxy" option to the "bind" keyword
Willy Tarreau [Fri, 15 Oct 2010 12:27:08 +0000 (14:27 +0200)] 
[MINOR] listener: add the "accept-proxy" option to the "bind" keyword

This option will enable the AN_REQ_DECODE_PROXY analyser on the requests
that come from those listeners.

14 years ago[MINOR] buffers: add a new request analyser flag for PROXY mode
Willy Tarreau [Fri, 15 Oct 2010 12:12:12 +0000 (14:12 +0200)] 
[MINOR] buffers: add a new request analyser flag for PROXY mode

Since it must be the first analyser, the other flags have been renumbered.

14 years ago[CONTRIB] halog: minor speed improvement in timer parser
Willy Tarreau [Thu, 28 Oct 2010 18:39:50 +0000 (20:39 +0200)] 
[CONTRIB] halog: minor speed improvement in timer parser

The timer parser looks for the next slash after the last timer, which is
very far away. Those 4 occurrences have been fixed to match the way it's
done in URL sorting, which is faster. Average speed gain is 5-6% on -srv
and -pct.
(cherry picked from commit 3555671c93695f48c02ef05c8bb228523f17ca20)

14 years ago[CONTRIB] halog: report per-url counts, errors and times
Willy Tarreau [Thu, 28 Oct 2010 18:33:46 +0000 (20:33 +0200)] 
[CONTRIB] halog: report per-url counts, errors and times

Using -u{,c,e,t,a,to,ao} it is possible to get per-URL statistics, sorted by
URL, request count, error count, total time, avg time, total time on OK requests,
avg time on OK requests.

Since it has to parse URLs and store a number of fields, it's quite slower
than other methods, but still correct for production usage (typically 800000
lines or 270 MB per second on a 2 GHz system).

Results are sorted in reverse order so that it's easy to catch them by piping
the output to the "head" command.
(cherry picked from commit 15ce7f56d15f839ce824279b84ffe14c58e41fda)

14 years ago[BUG] ebtree: fix duplicate strings insertion
Willy Tarreau [Thu, 28 Oct 2010 20:48:29 +0000 (22:48 +0200)] 
[BUG] ebtree: fix duplicate strings insertion

(update to ebtree 6.0.4)

Recent fix fd301cc1370cd4977fe175dfa4544c7dc0e7ce6b was not OK because it
was returning one excess byte, causing some duplicates not to be detected.
The reason is that we added 8 bits to count the trailing zero but they
were implied by the pre-incrementation of the pointer.

Fixing this was still not enough, as the problem appeared when
string_equal_bits() was applied on two identical strings, and it returned
a number of bits covering the trailing zero. Subsequent calls were applied
to the first byte after this trailing zero. It was often zero when doing
insertion from raw files, explaining why the issue was not discovered
earlier. But when the data is from a reused area, duplicate strings are not
correctly detected when inserting into the tree.

Several solutions were tested, and the only efficient one consists in making
string_equal_bits() notify the caller that the end of the string was reached.
It now returns zero and the callers just have to ensure that when they get a
zero, they stop using that bit until a dup tree or a leaf is encountered.

This fix brought the unexpected bonus of simplifying the insertion code a bit
and making it slightly faster to process duplicates.

The impact for haproxy was that if many similar string patterns were loaded
from a file, there was a potential risk that their insertion or matching could
have been slower. The bigger impact was with the URL sorting feature of halog,
which is not yet merged and is how this bug was discovered.
(cherry picked from commit 518d59ec9ba43705f930f9ece3749c450fd005df)

14 years ago[CONTRIB] Update Cacti Tempates
Krzysztof Piotr Oledzki [Mon, 25 Oct 2010 12:59:22 +0000 (14:59 +0200)] 
[CONTRIB] Update Cacti Tempates

This patch adds new haproxy_socket.xml template and updates
haproxy_backend.xml and haproxy_frontend.xml templates.
(cherry picked from commit 67cd1d55b5513e4186f021a7014e9442fd7a710f)

14 years ago[CONTRIB] Update haproxy.pl
Krzysztof Piotr Oledzki [Mon, 25 Oct 2010 14:04:17 +0000 (16:04 +0200)] 
[CONTRIB] Update haproxy.pl

This patch adds support for Sockets and several
new variables available in the 1.4 branch.
(cherry picked from commit d049c84fdc9e35472a3db87e45069afd92bee01d)

14 years ago[MINOR] cookie: add support for the "preserve" option
Willy Tarreau [Sat, 23 Oct 2010 10:46:42 +0000 (12:46 +0200)] 
[MINOR] cookie: add support for the "preserve" option

This option makes haproxy preserve any persistence cookie emitted by
the server, which allows the server to change it or to unset it, for
instance, after a logout request.
(cherry picked from commit 52e6d75374c7900c1fe691c5633b4ae029cae8d5)

14 years ago[BUG] cookie: correctly unset default cookie parameters
Willy Tarreau [Sat, 23 Oct 2010 09:37:27 +0000 (11:37 +0200)] 
[BUG] cookie: correctly unset default cookie parameters

When a backend defines a new cookie, it forgot to unset any params
that could have been set in a defaults section, resulting in configs
that would sometimes refuse to load or not work as expected.
(cherry picked from commit f80bf174ed905a29a3ed8ee91fcd528da6df174f)

14 years ago[DOC] fix typos about bind-process syntax
Willy Tarreau [Sat, 23 Oct 2010 09:22:08 +0000 (11:22 +0200)] 
[DOC] fix typos about bind-process syntax

Reported by Tijn Lambrechtsen.
(cherry picked from commit 365cddc61dec824c7edcfca7cf974222a42f4896)

14 years ago[MINOR] acl: add the http_req_first match
Willy Tarreau [Fri, 22 Oct 2010 18:04:13 +0000 (20:04 +0200)] 
[MINOR] acl: add the http_req_first match

This match returns true when the request calling it is the first one of
a connection.
(cherry picked from commit 922ca979c50653c415852531f36fe409190ad76b)

14 years ago[BUG] proto_tcp: potential bug on pattern fetch dst and dport
emeric [Fri, 22 Oct 2010 15:06:26 +0000 (17:06 +0200)] 
[BUG] proto_tcp: potential bug on pattern fetch dst and dport

Pattern fetches relying on destination address must first fetch
the address if it has not been done yet.

(cherry picked from commit 21abf441feb318b2ccd7df590fd89e9e824627f6)

14 years ago[CONTRIB] add templates for Cacti.
Mathieu Trudel [Fri, 22 Oct 2010 15:08:48 +0000 (17:08 +0200)] 
[CONTRIB] add templates for Cacti.

Hi,

I've attached the templates I've built for monitoring backends and
frontends of haproxy.

To install these, you will need to copy the XML files from the contrib/
directory of the haproxy distribution into a directory that Cacti can
reach, and edit the Data Queries "HaProxy Backends" and "HAProxy
Frontends" accordingly (the "XML Path" field. It's also dependant on
having a version of net-snmp that supports embedded Perl, and including
the "perl do 'path_to_haproxy.pl';" directive in your snmpd.conf file.

As for what is created:

- For the devices, you have two new data queries to choose from, they
can be added from the Devices page for each device, at the very end in
the drop-down box, then click "Add". The data queries are called
"HaProxy Backends" and "HAProxy Frontends".

- From "HaProxy Backends": in the new graphs page, you can choose which
backend to graph, and create one of two graphs:
- Haproxy backend traffic:  ingress and egress bytes.
- Haproxy backend sessions:  total sessions with _reponse_ errors.

- From "HAProxy Frontends": in the new graphs page again, you can choose
which frontend to graph, which will include aggregated data for the
backends behind it, obviously. You can create one of two graphs:
- Haproxy frontend traffic:  ingress and egress bytes.
- Haproxy frontend sessions:  total sessions with _request_ errors.

In the graphs and data sources, limits are set to reasonably high values
to support up to nearly 10G traffic, and up to 10000 concurrent
connections.

/ Matt
(cherry picked from commit f63090f2e85cdb7448071cdceb2eb5fabd2b9320)

14 years ago[MINOR] add better support to "mysql-check"
Hervé COMMOWICK [Mon, 18 Oct 2010 13:58:36 +0000 (15:58 +0200)] 
[MINOR] add better support to "mysql-check"

The MySQL check has been revamped to be able to send real MySQL data,
and to avoid Aborted connects on MySQL side.
It is however backward compatible with older version, but it is highly
recommended to use the new mode, by adding "user <username>" on the
"mysql-check" line.

The new check consists in sending two MySQL packet, one Client
Authentication packet, with "haproxy" username (by default), and one
QUIT packet, to correctly close MySQL session. We then parse the Mysql
Handshake Initialisation packet and/or Error packet. It is a basic but
useful test which does not produce error nor aborted connect on the
server.
(cherry picked from commit a1e4dcfe5718311b7653d7dabfad65c005d0439b)

14 years ago[MINOR] checks: ensure that we can inherit binary checks from the defaults section
Willy Tarreau [Fri, 22 Oct 2010 14:15:31 +0000 (16:15 +0200)] 
[MINOR] checks: ensure that we can inherit binary checks from the defaults section

Health checks were all pure ASCII, but we're going to have to support some
binary checks (eg: SQL). When they're inherited from the default section,
they will be truncated to the first \0 due to strdup(). Let's fix that with
a simple malloc.
(cherry picked from commit 98fc04a766bcff80f57db2b1cd865c91761b131b)

14 years ago[BUG] config: report correct keywords for "observe"
Willy Tarreau [Fri, 22 Oct 2010 12:53:40 +0000 (14:53 +0200)] 
[BUG] config: report correct keywords for "observe"

Keywords were changed just before the commit but not in the help message.
Spotted by Hank A. Paulson.
(cherry picked from commit fdd46a0766dccec704aa1bd5acb0ac99a801c549)

14 years ago[MEDIUM] checks: set server state to one state from failure when leaving maintenance
Willy Tarreau [Fri, 22 Oct 2010 12:39:02 +0000 (14:39 +0200)] 
[MEDIUM] checks: set server state to one state from failure when leaving maintenance

When we're enabling a server again (unix CLI or stats interface), we must not mark
it completely up because it can take a while before a failure is detected. So we
mark it one step above failure, which means it's up but will be marked down upon
first failure.
(cherry picked from commit 83c3e06452457ed5660fc814cbda5bf878bf19a2)

14 years ago[DOC] stats: document the "stats admin" statement
Cyril Bonté [Mon, 11 Oct 2010 22:14:37 +0000 (00:14 +0200)] 
[DOC] stats: document the "stats admin" statement

(cherry picked from commit ebf0595f9b554f22c6bccbbb6252b89cf8f25626)

14 years ago[MEDIUM] stats: add an admin level
Cyril Bonté [Mon, 11 Oct 2010 22:14:36 +0000 (00:14 +0200)] 
[MEDIUM] stats: add an admin level

The stats web interface must be read-only by default to prevent security
holes. As it is now allowed to enable/disable servers, a new keyword
"stats admin" is introduced to activate this admin level, conditioned by ACLs.
(cherry picked from commit 5334bab92ca7debe36df69983c19c21b6dc63f78)

14 years ago[MEDIUM] enable/disable servers from the stats web interface
Cyril Bonté [Mon, 11 Oct 2010 22:14:35 +0000 (00:14 +0200)] 
[MEDIUM] enable/disable servers from the stats web interface

Based on a patch provided by Judd Montgomery, it is now possible to
enable/disable servers from the stats web interface. This allows to select
several servers in a backend and apply the action to them at the same time.

Currently, there are 2 known limitations :
- The POST data are limited to one packet
  (don't alter too many servers at a time).
- Expect: 100-continue is not supported.
(cherry picked from commit 7693948766cb5647ac03b48e782cfee2b1f14491)

14 years ago[BUG] checks: don't log backend down for all zero-weight servers
Willy Tarreau [Sun, 17 Oct 2010 15:16:42 +0000 (17:16 +0200)] 
[BUG] checks: don't log backend down for all zero-weight servers

In a down backend, when a zero-weight server is lost, a new
"backend down" message was emitted and the down transition of that
backend was wrongly increased. This change ensures that we don't
count that transition again.

This patch should be backported to 1.3.
(cherry picked from commit 60efc5f745b5fa70d811f977727592e47e32a281)

14 years ago[DOC] document the cookie maxidle and maxlife parameters
Willy Tarreau [Wed, 13 Oct 2010 17:30:47 +0000 (19:30 +0200)] 
[DOC] document the cookie maxidle and maxlife parameters

(cherry picked from commit 9904877ebe8a0710c4b0c44b9d895b0a5cf947eb)

14 years ago[MEDIUM] cookie: set the date in the cookie if needed
Willy Tarreau [Thu, 7 Oct 2010 19:00:29 +0000 (21:00 +0200)] 
[MEDIUM] cookie: set the date in the cookie if needed

If a maxidle or maxlife parameter is set on the persistence cookie in
insert mode and the client did not provide a recent enough cookie,
then we emit a new cookie with a new last_seen date and the same
first_seen (if maxlife is set). Recent enough here designates a
cookie that would be rounded to the same date. That way, we can
refresh a cookie when required without doing it in all responses.

If the request did not contain such parameters, they are set anyway.
This means that a monitoring request that is forced to a server will
get an expiration date anyway, but this should not be a problem given
that the client is able to set its cookie in this case. This also
permits to force an expiration date on visitors who previously did
not have one.

If a request comes with a dated cookie while no date check is performed,
then a new cookie is emitted with no date, so that we don't risk dropping
the user too fast due to a very old date when we re-enable the date check.

All requests that were targetting the correct server and which had their
expiration date added/updated/removed in the response cookie are logged
with the 'U' ("updated") flag instead of the 'I' ("inserted"). So very
often we'll see "VU" instead of "VN".
(cherry picked from commit 8b3c6ecab6d37be5f3655bc3a2d2c0f9f37325eb)

14 years ago[MEDIUM] cookie: check for maxidle and maxlife for incoming dated cookies
Willy Tarreau [Thu, 7 Oct 2010 18:06:11 +0000 (20:06 +0200)] 
[MEDIUM] cookie: check for maxidle and maxlife for incoming dated cookies

If a cookie comes in with a first or last date, and they are configured on
the backend, they're checked. If a date is expired or too far in the future,
then the cookie is ignored and the specific reason appears in the cookie
field of the logs.
(cherry picked from commit faa3019107eabe6b3ab76ffec9754f2f31aa24c6)

14 years ago[MINOR] add encode/decode function for 30-bit integers from/to base64
Willy Tarreau [Thu, 7 Oct 2010 17:27:29 +0000 (19:27 +0200)] 
[MINOR] add encode/decode function for 30-bit integers from/to base64

These functions only require 5 chars to encode 30 bits, and don't expect
any padding. They will be used to encode dates in cookies.
(cherry picked from commit a7e2b5fc4612994c7b13bcb103a4a2c3ecd6438a)

14 years ago[MEDIUM] cookie: reassign set-cookie status flags to store more states
Willy Tarreau [Thu, 7 Oct 2010 13:54:11 +0000 (15:54 +0200)] 
[MEDIUM] cookie: reassign set-cookie status flags to store more states

The set-cookie status flags were not very handy and limited. Reorder
them to save some room for additional values and add the "U" flags
(for Updated expiration date) that will be used with expirable cookies
in insert mode.
(cherry picked from commit 5bab52f821bb0fa99fc48ad1b400769e66196ece)

14 years ago[MINOR] cookie: add the expired (E) and old (O) flags for request cookies
Willy Tarreau [Thu, 7 Oct 2010 13:28:23 +0000 (15:28 +0200)] 
[MINOR] cookie: add the expired (E) and old (O) flags for request cookies

These flags will indicate the cookie status when an expiration date is
set.
(cherry picked from commit 3f0f0e4583a432d34b75bc7b9dd2c756b4e181a7)

14 years ago[MINOR] http: make some room in the transaction flags to extend cookies
Willy Tarreau [Wed, 6 Oct 2010 17:38:55 +0000 (19:38 +0200)] 
[MINOR] http: make some room in the transaction flags to extend cookies

We'll need one more bit to store and report the request cookie's status.
Doing this required moving a few bits around. However, now in 1.4 all bits
are used, there's no room left.

Cookie flags will need
(cherry picked from commit 09ebca0413c43620ddc375b5b4ab31a25d47b3f4)

14 years ago[MEDIUM] cookie: support client cookies with some contents appended to their value
Willy Tarreau [Wed, 6 Oct 2010 17:25:55 +0000 (19:25 +0200)] 
[MEDIUM] cookie: support client cookies with some contents appended to their value

In all cookie persistence modes but prefix, we now support cookies whose
value is suffixed with some contents after a vertical bar ('|'). This will
be used to pass an optional expiration date. So as of now we only consider
the part of the cookie value which is used before the vertical bar.
(cherry picked from commit a4486bf4e5b03b5a980d03fef799f6407b2c992d)

14 years ago[MINOR] cookie: add options "maxidle" and "maxlife"
Willy Tarreau [Wed, 6 Oct 2010 14:59:56 +0000 (16:59 +0200)] 
[MINOR] cookie: add options "maxidle" and "maxlife"

Add two new arguments to the "cookie" keyword, to be able to
fix a max idle and max life on them. Right now only the parameter
parsing is implemented.
(cherry picked from commit 9ad5dec4c3bb8f29129f292cb22d3fc495fcc98a)

14 years ago[DOC] fix http-request documentation
Cyril Bonté [Thu, 30 Sep 2010 21:46:30 +0000 (23:46 +0200)] 
[DOC] fix http-request documentation

- fix some erroneous keywords for http-request
- stats http-request was not documented

--
Cyril Bonté
(cherry picked from commit 17e07dad5074571c38cbeb92d54a20f83658449d)

14 years ago[MINOR] global: add "tune.chksize" to change the default check buffer size
Willy Tarreau [Mon, 4 Oct 2010 18:39:20 +0000 (20:39 +0200)] 
[MINOR] global: add "tune.chksize" to change the default check buffer size

HTTP content-based health checks will be involved in searching text in pages.
Some pages may not fit in the default buffer (16kB) and sometimes it might be
desired to have larger buffers in order to find patterns. Running checks on
smaller URIs is always preferred of course.
(cherry picked from commit 043f44aeb835f3d0b57626c4276581a73600b6b1)

14 years ago[TESTS] add test-check-expect to test various http-check methods
Willy Tarreau [Mon, 4 Oct 2010 18:20:05 +0000 (20:20 +0200)] 
[TESTS] add test-check-expect to test various http-check methods

(cherry picked from commit 2f123a994b76598ce1eeeeefe94edbf7c8ff121c)

14 years ago[MEDIUM] checks: add support for HTTP contents lookup
Willy Tarreau [Tue, 16 Mar 2010 17:46:54 +0000 (18:46 +0100)] 
[MEDIUM] checks: add support for HTTP contents lookup

This patch adds the "http-check expect [r]{string,status}" statements
which enable health checks based on whether the response status or body
to an HTTP request contains a string or matches a regex.

This probably is one of the oldest patches that remained unmerged. Over
the time, several people have contributed to it, among which FinalBSD
(first and second implementations), Nick Chalk (port to 1.4), Anze
Skerlavaj (tests and fixes), Cyril Bonté (general fixes), and of course
myself for the final fixes and doc during integration.

Some people already use an old version of this patch which has several
issues, among which the inability to search for a plain string that is
not at the beginning of the data, and the inability to look for response
contents that are provided in a second and subsequent recv() calls. But
since some configs are already deployed, it was quite important to ensure
a 100% compatible behaviour on the working cases.

Thus, that patch fixes the issues while maintaining config compatibility
with already deployed versions.

(cherry picked from commit b507c43a3ce9a8e8e4b770e52e4edc20cba4c37f)

14 years ago[MINOR] checks: add support for LDAPv3 health checks
Gabor Lekeny [Wed, 29 Sep 2010 16:17:05 +0000 (18:17 +0200)] 
[MINOR] checks: add support for LDAPv3 health checks

This patch provides a new "option ldap-check" statement to enable
server health checks based on LDAPv3 bind requests.
(cherry picked from commit b76b44c6fed8a7ba6f0f565dd72a9cb77aaeca7c)

14 years ago[MEDIUM] tcp-request : don't wait for inspect-delay to expire when the buffer is...
Willy Tarreau [Wed, 29 Sep 2010 14:36:16 +0000 (16:36 +0200)] 
[MEDIUM] tcp-request : don't wait for inspect-delay to expire when the buffer is full

If a request buffer is full, there's no point waiting for the timeout to
expire, the contents will not change.

14 years ago[MEDIUM] make it possible to combine http-pretend-keepalived with httpclose
Willy Tarreau [Wed, 29 Sep 2010 12:31:41 +0000 (14:31 +0200)] 
[MEDIUM] make it possible to combine http-pretend-keepalived with httpclose

Some configs may involve httpclose in a frontend and http-pretend-keepalive
in a backend. httpclose used to take priority over keepalive, thus voiding
its effect. This change ensures that when both are combined, keepalive is
still announced to the server while close is announced to the client.
(cherry picked from commit 2be7ec90fa9caf66294f446423bbab2d00db9004)

14 years ago[BUILD] proto_http: eliminate some build warnings with gcc-2.95
Willy Tarreau [Tue, 28 Sep 2010 17:42:42 +0000 (19:42 +0200)] 
[BUILD] proto_http: eliminate some build warnings with gcc-2.95

gcc-2.95 does not like labels before the first case in a switch
statement.
(cherry picked from commit e1c51a861ba0c389d31dfb010e8b188f5f43313a)

14 years ago[BUG] Restore info about available active/backup servers
Krzysztof Piotr Oledzki [Mon, 27 Sep 2010 11:10:50 +0000 (13:10 +0200)] 
[BUG] Restore info about available active/backup servers

Bug introduced by 5f5b7d2c1db1fabe3d372b0080a8773147762ee7

This bug was reported by Guido Krause.
(cherry picked from commit 0c801d1f5ffdc2fe3d036c1e5203d617507c55c3)

14 years ago[BUG] stream_sock: try to flush any extra pending request data after a POST
Willy Tarreau [Tue, 28 Sep 2010 12:16:41 +0000 (14:16 +0200)] 
[BUG] stream_sock: try to flush any extra pending request data after a POST

Some broken browsers still happen to send a CRLF after a POST. Those which
send a CRLF in a second packet have it queued into the system's buffers,
which causes an RST to be emitted by some systems upon close of the response
(eg: Linux). The client may then receive the RST without the last response
segments, resulting in a truncated response.

This change leaves request polling enabled on a POST so that we can flush
any late data from the request buffers.

A more complete workaround would consist in reading from the request for a
long time, until we get confirmation that the close has been ACKed. This
is much more complex and should only be studied for newer versions.
(cherry picked from commit 12e316af4f0245fde12dbc224ebe33c8fea806b2)

14 years ago[BUG] ebtree: string_equal_bits() could return garbage on identical strings
Willy Tarreau [Tue, 28 Sep 2010 09:28:19 +0000 (11:28 +0200)] 
[BUG] ebtree: string_equal_bits() could return garbage on identical strings

(from ebtree 6.0.2)

When inserting duplicates on x86/x86_64, the assembler optimization
does not support equal strings that both end up with a zero, and
can return garbage in the bit number, possibly causing a segfault
for its users. The only case where this can happen appears to be
in ebst_insert().
(cherry picked from commit 006152c62ae56d151188626e6074a79be3928858)

14 years ago[DOC] tcp-request inspect-delay is for backends too
Willy Tarreau [Tue, 14 Sep 2010 09:31:36 +0000 (11:31 +0200)] 
[DOC] tcp-request inspect-delay is for backends too

14 years ago[DOC] missing index entry for http-check send-state
Willy Tarreau [Tue, 12 Oct 2010 04:30:16 +0000 (06:30 +0200)] 
[DOC] missing index entry for http-check send-state