]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
14 years ago[BUG] stream_sock: disable listener when system resources are exhausted
Willy Tarreau [Fri, 22 Jul 2011 14:56:33 +0000 (16:56 +0200)] 
[BUG] stream_sock: disable listener when system resources are exhausted

When an accept() returns -1 ENFILE du to system limits, it leaves the
connection pending in the backlog and epoll() comes back immediately
afterwards trying to make it accept it again. This causes haproxy to
remain at 100% CPU until something makes an accept() possible again.
Now upon such resource shortage, we mark the listener FULL so that we
only enable it again once at least one connection has been released.
In fact we only do that if there are some active connections on this
proxy, so that it has a chance to be marked not full again. This makes
haproxy remain idle when all resources are used, which helps a lot
releasing those resource as fast as possible.

Backport to 1.4 might be desirable but difficult and tricky.

14 years ago[OPTIM] stream_sock: reduce the default number of accepted connections at once
Willy Tarreau [Fri, 22 Jul 2011 19:59:59 +0000 (21:59 +0200)] 
[OPTIM] stream_sock: reduce the default number of accepted connections at once

By default on a single process, we accept 100 connections at once. This is too
much on recent CPUs where the cache is constantly thrashing, because we visit
all those connections several times. We should batch the processing slightly
less so that all the accepted session may remain in cache during their initial
processing.

Lowering the batch size from 100 to 32 has changed the connection rate for
concurrencies between 5-10k from 67 kcps to 94 kcps on a Core i5 660 (4M L3),
and forward rates from 30k to 39.5k.

Tests on this hardware show that values between 10 and 30 seem to do the job fine.

14 years ago[MINOR] session: try to emit a 500 response on memory allocation errors
Willy Tarreau [Fri, 22 Jul 2011 15:36:27 +0000 (17:36 +0200)] 
[MINOR] session: try to emit a 500 response on memory allocation errors

When we fail to create a session because of memory shortage, let's at
least try to send a 500 message directly on the socket. Even if we don't
have any buffers left, the kernel's orphans management will take care of
delivering the message as long as there are socket buffers left.

14 years ago[BUG] session: risk of crash on out of memory (1.5-dev regression)
Willy Tarreau [Tue, 19 Jul 2011 22:17:39 +0000 (00:17 +0200)] 
[BUG] session: risk of crash on out of memory (1.5-dev regression)

Patch af5149 introduced an issue which can be detected only on out of
memory conditions : a LIST_DEL() may be performed on an uninitialized
struct member instead of a LIST_INIT() during the accept() phase,
causing crashes and memory corruption to occur.

This issue was detected and diagnosed by the Exceliance R&D team.

This is 1.5-specific and very recent, so no existing deployment should
be impacted.

14 years ago[MINOR] Free stick rules on denint()
Simon Horman [Fri, 15 Jul 2011 04:14:11 +0000 (13:14 +0900)] 
[MINOR] Free stick rules on denint()

The motivation for this is that when soft-restart is merged
it will be come more important to free all relevant memory in deinit()

Discovered using valgrind.

14 years ago[MINOR] Free stick table pool on denint()
Simon Horman [Fri, 15 Jul 2011 04:14:10 +0000 (13:14 +0900)] 
[MINOR] Free stick table pool on denint()

The motivation for this is that when soft-restart is merged
it will be come more important to free all relevant memory in deinit()

Discovered using valgrind.

14 years ago[MINOR] Free tcp rules on denint()
Simon Horman [Fri, 15 Jul 2011 04:14:09 +0000 (13:14 +0900)] 
[MINOR] Free tcp rules on denint()

The motivation for this is that when soft-restart is merged
it will be come more important to free all relevant memory in deinit()

Discovered using valgrind.

14 years ago[MINOR] Free rdp_cookie_name on denint()
Simon Horman [Fri, 15 Jul 2011 04:14:08 +0000 (13:14 +0900)] 
[MINOR] Free rdp_cookie_name on denint()

The motivation for this is that when soft-restart is merged
it will be come more important to free all relevant memory in deinit()

Discovered using valgrind.

14 years ago[MINOR] Consistently free expr on error in cfg_parse_listen()
Simon Horman [Fri, 15 Jul 2011 04:14:07 +0000 (13:14 +0900)] 
[MINOR] Consistently free expr on error in cfg_parse_listen()

It seems to me that without this change cfg_parse_listen()
may leak memory.

14 years ago[MINOR] Consistently use error in tcp_parse_tcp_req()
Simon Horman [Fri, 15 Jul 2011 04:14:06 +0000 (13:14 +0900)] 
[MINOR] Consistently use error in tcp_parse_tcp_req()

It seems to me that without this change tcp_parse_tcp_req()
may leak memory.

14 years ago[OPTIM] halog: remove support for tab delimiters in input data
Willy Tarreau [Sun, 10 Jul 2011 20:11:17 +0000 (22:11 +0200)] 
[OPTIM] halog: remove support for tab delimiters in input data

Haproxy does not use tabs when sending logs, and checking for them
wastes no less than 4% of CPU cycles. Better get rid of these tests.

14 years ago[OPTIM] halog: remove many 'if' by using a function pointer for the filters
Willy Tarreau [Sun, 10 Jul 2011 19:39:35 +0000 (21:39 +0200)] 
[OPTIM] halog: remove many 'if' by using a function pointer for the filters

There were too many filters, we were losing time in all the "if" statements.
By moving all the filters to independant functions, we made the code cleaner
and slightly faster (3%).

One minor bug was found, the -tc and -st options did not report the number
of output lines, but always zero.

14 years ago[OPTIM] halog: check once for correct line format and reuse the pointer
Willy Tarreau [Sun, 10 Jul 2011 17:47:48 +0000 (19:47 +0200)] 
[OPTIM] halog: check once for correct line format and reuse the pointer

Almost all filters first check the line format, which takes a lot of code
and requires parsing back and forth. By centralizing this test, we can
save about 15-20 more percent of performance for all filters.

Also, the test was wrong, it was checking that the source IP address was
starting with a digit, which is not always true with local IPv6 addresses.
Instead, we now check that the next field (accept field) starts with an
opening bracket and is followed by a digit between 0 and 3 (day of the
month). Doing this has contributed a 2% speedup because all other field
calculations were relative to a closer field.

14 years ago[OPTIM] halog: cache some common fields positions
Willy Tarreau [Sun, 10 Jul 2011 16:53:44 +0000 (18:53 +0200)] 
[OPTIM] halog: cache some common fields positions

Since many fields are relative and some are used a lot, try to cache them
the first time they're used in order to avoid skipping them twice. The
status counts with HTTP pre-check enabled has sped up by 40%.

14 years ago[MINOR] halog: gain back performance before SKIP_CHAR fix
Willy Tarreau [Sun, 10 Jul 2011 16:15:08 +0000 (18:15 +0200)] 
[MINOR] halog: gain back performance before SKIP_CHAR fix

The SKIP_CHAR fix caused a measurable performance drop. Since we can
consider all chars below 0x20 as delimiters, we can avoid a cache lookup
which requires a char to pointer conversion.

14 years ago[MINOR] halog: add support for HTTP log matching (-H)
Willy Tarreau [Sun, 10 Jul 2011 15:27:40 +0000 (17:27 +0200)] 
[MINOR] halog: add support for HTTP log matching (-H)

Now it's possible to restrict analysis to HTTP-looking logs when passing -H.
-H -v gives the opposite (most likely TCP logs).

14 years ago[MINOR] halog: make SKIP_CHAR stop on field delimiters
Willy Tarreau [Sun, 10 Jul 2011 15:25:33 +0000 (17:25 +0200)] 
[MINOR] halog: make SKIP_CHAR stop on field delimiters

The SKIP_CHAR() macro did not consider field delimiters, causing the timer parser
to be able to search timers at wrong places when fed with TCP logs.

14 years ago[BUG] halog: correctly handle truncated last line
Willy Tarreau [Sat, 9 Jul 2011 12:28:01 +0000 (14:28 +0200)] 
[BUG] halog: correctly handle truncated last line

If last line is truncated (eg: truncated file), then halog would loop on
it forever.

14 years ago[MEDIUM] http: add support for 'cookie' and 'set-cookie' patterns
Willy Tarreau [Fri, 1 Jul 2011 14:16:17 +0000 (16:16 +0200)] 
[MEDIUM] http: add support for 'cookie' and 'set-cookie' patterns

This is used to perform cookie-based stickiness with table replication
between multiple masters and across restarts. This partially overrides
some of the appsession capabilities.

14 years ago[DOC] add missing entry or stick store-response
Willy Tarreau [Fri, 1 Jul 2011 09:33:25 +0000 (11:33 +0200)] 
[DOC] add missing entry or stick store-response

14 years ago[MINOR] Add non-stick server option
Simon Horman [Sat, 25 Jun 2011 00:39:49 +0000 (09:39 +0900)] 
[MINOR] Add non-stick server option

Never add connections allocated to this sever to a stick-table.
This may be used in conjunction with backup to ensure that
stick-table persistence is disabled for backup servers.

14 years ago[CLEANUP] Remove unnecessary casts
Simon Horman [Fri, 24 Jun 2011 06:11:37 +0000 (15:11 +0900)] 
[CLEANUP] Remove unnecessary casts

There is no need to cast when going to or from void *

14 years ago[MINOR] Add rdp_cookie pattern fetch function
Simon Horman [Fri, 24 Jun 2011 05:50:20 +0000 (14:50 +0900)] 
[MINOR] Add rdp_cookie pattern fetch function

This pattern fetch function extracts the value of the rdp cookie <name> as
a string and uses this value to match. This enables implementation of
persistence based on the mstshash cookie. This is typically done if there
is no msts cookie present.

This differs from "balance rdp-cookie" in that any balancing algorithm may
be used and thus the distribution of clients to backend servers is not
linked to a hash of the RDP cookie. It is envisaged that using a balancing
algorithm such as "balance roundrobin" or "balance leastconnect" will lead
to a more even distribution of clients to backend servers than the hash
used by "balance rdp-cookie".

Example :
listen tse-farm
    bind 0.0.0.0:3389
    # wait up to 5s for an RDP cookie in the request
    tcp-request inspect-delay 5s
    tcp-request content accept if RDP_COOKIE
    # apply RDP cookie persistence
    persist rdp-cookie
    # Persist based on the mstshash cookie
    # This is only useful makes sense if
    # balance rdp-cookie is not used
    stick-table type string size 204800
    stick on rdp_cookie(mstshash)
    server srv1 1.1.1.1:3389
    server srv1 1.1.1.2:3389

14 years ago[MINOR] Make appsess{,ion}_refresh static
Simon Horman [Fri, 24 Jun 2011 05:49:57 +0000 (14:49 +0900)] 
[MINOR] Make appsess{,ion}_refresh static

apsession_refresh() and apsess_refressh are only used inside apsession.c
and thus can be made static.

The only use of apsession_refresh() is appsession_task_init().
These functions have been re-ordered to avoid the need for
a forward-declaration of apsession_refresh().

14 years ago[MINOR] Add down termination condition
Simon Horman [Tue, 21 Jun 2011 05:34:59 +0000 (14:34 +0900)] 
[MINOR] Add down termination condition

If a connection is closed by because the backend became unavailable
then log 'D' as the termination condition.

Signed-off-by: Simon Horman <horms@verge.net.au>
14 years ago[MINOR] Allow shutdown of sessions when a server becomes unavailable
Simon Horman [Tue, 21 Jun 2011 05:34:58 +0000 (14:34 +0900)] 
[MINOR] Allow shutdown of sessions when a server becomes unavailable

This adds the "on-marked-down shutdown-sessions" statement on "server" lines,
which causes all sessions established on a server to be killed at once when
the server goes down. The task's priority is reniced to the highest value
(1024) so that servers holding many tasks don't cause a massive slowdown due
to the wakeup storm.

14 years ago[MINOR] Add active connection list to server
Simon Horman [Tue, 21 Jun 2011 05:34:57 +0000 (14:34 +0900)] 
[MINOR] Add active connection list to server

The motivation for this is to allow iteration of all the connections
of a server without the expense of iterating over the global list
of connections.

The first use of this will be to implement an option to close connections
associated with a server when is is marked as being down or in maintenance
mode.

14 years ago[CLEANUP] session.c: Make functions static where possible
Simon Horman [Wed, 8 Jun 2011 00:19:07 +0000 (09:19 +0900)] 
[CLEANUP] session.c: Make functions static where possible

14 years ago[CLEANUP] peers.h: fix declarations
Simon Horman [Wed, 8 Jun 2011 00:18:51 +0000 (09:18 +0900)] 
[CLEANUP] peers.h: fix declarations

* The declaration of peer_session_create() does
  not match its definition. As it is only
  used inside of peers.c make it static.

* Make the declaration of peers_register_table()
  match its definition.

* Also, make all functions in peers.c that
  are not also in peers.h static

14 years ago[CLEANUP] Remove assigned but unused variables
Simon Horman [Tue, 7 Jun 2011 02:07:50 +0000 (11:07 +0900)] 
[CLEANUP] Remove assigned but unused variables

gcc (Debian 4.6.0-2) 4.6.1 20110329 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...
src/proto_http.c:3029:14: warning: variable â\80\98del_clâ\80\99 set but not used [-Wunused-but-set-variable]
In file included from ebtree/eb64tree.c:23:0:
ebtree/eb64tree.h: In function â\80\98__eb64_lookupâ\80\99:
ebtree/eb64tree.h:128:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function â\80\98__eb64i_lookupâ\80\99:
ebtree/eb64tree.h:180:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]
In file included from ebtree/ebpttree.h:26:0,
                 from ebtree/ebimtree.c:23:
ebtree/eb64tree.h: In function â\80\98__eb64_lookupâ\80\99:
ebtree/eb64tree.h:128:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function â\80\98__eb64i_lookupâ\80\99:
ebtree/eb64tree.h:180:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]
In file included from ebtree/ebpttree.h:26:0,
                 from ebtree/ebistree.h:25,
                 from ebtree/ebistree.c:23:
ebtree/eb64tree.h: In function â\80\98__eb64_lookupâ\80\99:
ebtree/eb64tree.h:128:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]
ebtree/eb64tree.h: In function â\80\98__eb64i_lookupâ\80\99:
ebtree/eb64tree.h:180:6: warning: variable â\80\98node_bitâ\80\99 set but not used [-Wunused-but-set-variable]

14 years ago[MINOR] Allow showing and clearing by key of string stick tables
Simon Horman [Wed, 15 Jun 2011 06:18:52 +0000 (15:18 +0900)] 
[MINOR] Allow showing and clearing by key of string stick tables

14 years ago[MINOR] Allow showing and clearing by key of integer stick tables
Simon Horman [Wed, 15 Jun 2011 06:18:51 +0000 (15:18 +0900)] 
[MINOR] Allow showing and clearing by key of integer stick tables

14 years ago[MINOR] Allow showing and clearing by key of ipv6 stick tables
Simon Horman [Wed, 15 Jun 2011 06:18:50 +0000 (15:18 +0900)] 
[MINOR] Allow showing and clearing by key of ipv6 stick tables

14 years ago[MINOR] More flexible clearing of stick table
Simon Horman [Wed, 15 Jun 2011 06:18:49 +0000 (15:18 +0900)] 
[MINOR] More flexible clearing of stick table

* Allow clearing of all entries of a table
* Allow clearing of all entries of a table
  that match a data filter

14 years ago[MINOR] Break out all stick table socat command parsing
Simon Horman [Wed, 15 Jun 2011 06:18:48 +0000 (15:18 +0900)] 
[MINOR] Break out all stick table socat command parsing

This will allow reuse for clearing table entries
other than by key

14 years ago[MINOR] Allow listing of stick table by key
Simon Horman [Wed, 15 Jun 2011 06:18:47 +0000 (15:18 +0900)] 
[MINOR] Allow listing of stick table by key

14 years ago[MINOR] Break out processing of clear table
Simon Horman [Wed, 15 Jun 2011 06:18:46 +0000 (15:18 +0900)] 
[MINOR] Break out processing of clear table

This will allow the code to be reused
for showing a table filtered by key

14 years ago[MINOR] Break out dumping table
Simon Horman [Wed, 15 Jun 2011 06:18:45 +0000 (15:18 +0900)] 
[MINOR] Break out dumping table

This will allow the code to be reused
for showing a table filtered by key

Signed-off-by: Simon Horman <horms@verge.net.au>
14 years ago[CLEANUP] dumpstats: make symbols static where possible
Simon Horman [Wed, 15 Jun 2011 06:18:44 +0000 (15:18 +0900)] 
[CLEANUP] dumpstats: make symbols static where possible

14 years ago[BUG] checks: fix support of Mysqld >= 5.5 for mysql-check
Hervé COMMOWICK [Fri, 10 Jun 2011 12:05:59 +0000 (14:05 +0200)] 
[BUG] checks: fix support of Mysqld >= 5.5 for mysql-check

mysqld >= 5.5 want the client to announce 4.1+ authentication support, even if we have no password, so we do this.
I also check on a debian potato mysqld 3.22 and it works too so i assume we are good from 3.22 to 5.5.

[WT: this must be backported to 1.4]

14 years ago[CLEANUP] config: remove some left-over printf debugging code from previous patch
Willy Tarreau [Tue, 14 Jun 2011 05:49:12 +0000 (07:49 +0200)] 
[CLEANUP] config: remove some left-over printf debugging code from previous patch

Last patch fbb784 unexpectedly left some debugging printf messages which can be
seen in debug mode.

14 years ago[MINOR] config: automatically compute a default fullconn value
Willy Tarreau [Sun, 5 Jun 2011 13:38:35 +0000 (15:38 +0200)] 
[MINOR] config: automatically compute a default fullconn value

The fullconn value is not easy to get right when doing dynamic regulation,
as it should depend on the maxconns of the frontends that can reach a
backend. Since the parameter is mandatory, many configs are found with
an inappropriate default value.

Instead of rejecting configs without a fullconn value, we now set it to
10% of the sum of the configured maxconns of all the frontends which are
susceptible to branch to the backend. That way if new frontends are added,
the backend's fullconn automatically adjusts itself.

14 years ago[DOC] Minor spelling fixes and grammatical enhancements
Simon Horman [Sun, 29 May 2011 06:01:10 +0000 (15:01 +0900)] 
[DOC] Minor spelling fixes and grammatical enhancements

14 years ago[BUG] stats: support url-encoded forms
Willy Tarreau [Tue, 31 May 2011 16:06:18 +0000 (18:06 +0200)] 
[BUG] stats: support url-encoded forms

Bashkim Kasa reported that the stats admin page did not work when colons
were used in server or backend names. This was caused by url-encoding
resulting in ':' being sent as '%3A'. Now we systematically decode the
field names and values to fix this issue.

14 years ago[MINOR] config: make it possible to specify a cookie even without a server
Willy Tarreau [Mon, 30 May 2011 16:47:41 +0000 (18:47 +0200)] 
[MINOR] config: make it possible to specify a cookie even without a server

Since version 1.0.0, it's forbidden to have a cookie specified without at
least one server. This test is useless and makes it complex to write APIs
to iteratively generate working configurations. Remove the test.

14 years ago[OPTIM] stream_sock: don't use splice on too small payloads
Willy Tarreau [Wed, 11 May 2011 18:47:24 +0000 (20:47 +0200)] 
[OPTIM] stream_sock: don't use splice on too small payloads

It's more expensive to call splice() on short payloads than to use
recv()+send(). One of the reasons is that doing a splice() involves
allocating a pipe. One other reason is that the kernel will have to
copy itself if we try to splice less than a page. So let's fix a
short offset of 4kB below which we don't splice.

A quick test shows that on chunked encoded data, with splice we had
6826 syscalls (1715 splice, 3461 recv, 1650 send) while with this
patch, the same transfer resulted in 5793 syscalls (3896 recv, 1897
send).

14 years ago[OPTIM] stream_sock: avoid fast-forwarding of partial data
Willy Tarreau [Wed, 11 May 2011 18:32:36 +0000 (20:32 +0200)] 
[OPTIM] stream_sock: avoid fast-forwarding of partial data

Fast-forwarding between file descriptors is nice but can be counter-productive
when only one part of the buffer is forwarded, because it can result in doubling
the number of send() syscalls. This is what happens on HTTP chunking, because
the chunk data are sent, then the CRLF + next chunk size are parsed and immediately
scheduled for forwarding. This results in two send() for the same block while a
single one would have done it.

14 years ago[OPTIM] http: optimize chunking again in non-interactive mode
Willy Tarreau [Mon, 30 May 2011 16:29:28 +0000 (18:29 +0200)] 
[OPTIM] http: optimize chunking again in non-interactive mode

Now that we support the http-no-delay mode, we can optimize HTTP
chunking again by always waiting for more data to come until the
last chunk is met.

This patch may or may not be backported to 1.4, it's not a big deal,
it will mainly help for chunks which are aligned with the buffer size.

14 years ago[MEDIUM] http: add support for "http-no-delay"
Willy Tarreau [Mon, 30 May 2011 16:10:30 +0000 (18:10 +0200)] 
[MEDIUM] http: add support for "http-no-delay"

There are some very rare server-to-server applications that abuse the HTTP
protocol and expect the payload phase to be highly interactive, with many
interleaved data chunks in both directions within a single request. This is
absolutely not supported by the HTTP specification and will not work across
most proxies or servers. When such applications attempt to do this through
haproxy, it works but they will experience high delays due to the network
optimizations which favor performance by instructing the system to wait for
enough data to be available in order to only send full packets. Typical
delays are around 200 ms per round trip. Note that this only happens with
abnormal uses. Normal uses such as CONNECT requests nor WebSockets are not
affected.

When "option http-no-delay" is present in either the frontend or the backend
used by a connection, all such optimizations will be disabled in order to
make the exchanges as fast as possible. Of course this offers no guarantee on
the functionality, as it may break at any other place. But if it works via
HAProxy, it will work as fast as possible. This option should never be used
by default, and should never be used at all unless such a buggy application
is discovered. The impact of using this option is an increase of bandwidth
usage and CPU usage, which may significantly lower performance in high
latency environments.

This change should be backported to 1.4 since the first report of such a
misuse was in 1.4. Next patch will also be needed.

14 years ago[CLEANUP] stream_sock: remove unneeded FL_TCP and factor out test
Willy Tarreau [Mon, 30 May 2011 15:32:53 +0000 (17:32 +0200)] 
[CLEANUP] stream_sock: remove unneeded FL_TCP and factor out test

The FL_TCP flag was a leftover from the old days we were using TCP_CORK.
With MSG_MORE it's not needed anymore so we can remove the condition and
sensibly simplify the test.

14 years ago[MINOR] stream_sock: always clear BF_EXPECT_MORE upon complete transfer
Willy Tarreau [Wed, 11 May 2011 18:14:03 +0000 (20:14 +0200)] 
[MINOR] stream_sock: always clear BF_EXPECT_MORE upon complete transfer

When sending is complete, it's preferred to systematically clear the flags
that were set for that transfer. What could happen is that the to_forward
counter had caused the MSG_MORE flag to be set and BF_EXPECT_MORE not to
be cleared, resulting in this flag being unexpectedly maintained for next
round.

The code has taken extreme care of not doing this till now, but it's not
acceptable that the caller has to know these precise semantics. So let's
unconditionnally clear the flag instead.

For the sake of safety, this fix should be backported to 1.4.

14 years ago[MINOR] http: partially revert the chunking optimization for now
Willy Tarreau [Wed, 11 May 2011 17:56:11 +0000 (19:56 +0200)] 
[MINOR] http: partially revert the chunking optimization for now

Commit 57f5c1 used to provide a nice improvement on chunked encoding since
it ensured that we did not set a PUSH flag for every chunk or buffer data
part of a chunked transfer.

Some applications appear to erroneously abuse HTTP chunking in order to
get interactive exchanges between a user agent and an origin server with
very small chunks. While it happens to work through haproxy, it's terribly
slow due to the latency added after passing each chunk to the system, who
could wait up to 200ms before pushing them onto the wire.

So we need an interactive mode for such usages. In the mean time, step back
on the optim, but not completely, so that we still keep the flag as long as
we know we're not finished with the current chunk.

This change should be backported to 1.4 too as the issue was discovered
with it.

14 years ago[MINOR] http: make the "HTTP 200" status code configurable.
Willy Tarreau [Wed, 11 May 2011 14:28:49 +0000 (16:28 +0200)] 
[MINOR] http: make the "HTTP 200" status code configurable.

This status code is used in response to requests matching "monitor-uri".
Some users need to adjust it to fit their needs (eg: make some strings
appear there). As it's already defined as a chunked string and used
exactly like other status codes, it makes sense to make it configurable
with the usual "errorfile", "errorloc", ...

14 years ago[REORG] http: move HTTP error codes back to proto_http.h
Willy Tarreau [Wed, 11 May 2011 14:10:11 +0000 (16:10 +0200)] 
[REORG] http: move HTTP error codes back to proto_http.h

This one was left isolated in its own file. It probably is a leftover
from the 1.2->1.3 split.

14 years ago[MINOR] http: don't report the "haproxy" word on the monitoring response
Willy Tarreau [Wed, 11 May 2011 14:00:54 +0000 (16:00 +0200)] 
[MINOR] http: don't report the "haproxy" word on the monitoring response

Some people like to make the monitoring URL testable from unsafe locations.
Reporting haproxy's existence there can sometimes be problematic. This patch
should not be backported to 1.4 because it is possible, eventhough unlikely,
that some scripts rely on this word to appear there.

14 years ago[BUG] fix binary stick-tables
Cyril Bonté [Mon, 9 May 2011 18:44:54 +0000 (20:44 +0200)] 
[BUG] fix binary stick-tables

As reported by Lauri-Alo Adamson, version 1.5-dev6 doesn't support
stick-tables with a binary type.
This issue was introduced in the commit 4f92d32 where a line was erroneously
deleted, and is 1.5-specific.

14 years ago[BUG] proto_tcp: fix address binding on remote source
Willy Tarreau [Tue, 19 Apr 2011 05:20:57 +0000 (07:20 +0200)] 
[BUG] proto_tcp: fix address binding on remote source

Mark Brooks reported that commit 1b4b7c broke tproxy in 1.5-dev6. Nick
Chalk tracked the issue down to a missing address family setting in
tcp_bind_socket() which resulted in a failure to use get_addr_len().
This issue is 1.5-specific.

14 years ago[DOC] fix minor typo in the "dispatch" doc
Willy Tarreau [Fri, 15 Apr 2011 04:45:37 +0000 (06:45 +0200)] 
[DOC] fix minor typo in the "dispatch" doc

Bradley Falzon reported a left-over of a copy-paste from the "disabled"
keyword in the "dispatch" section.

14 years ago[BUG] checks: http-check expect could fail a check on multi-packet responses
Willy Tarreau [Wed, 13 Apr 2011 07:32:41 +0000 (09:32 +0200)] 
[BUG] checks: http-check expect could fail a check on multi-packet responses

Christopher Blencowe reported that the httpchk_expect() function was
lacking a test for incomplete responses : if the server sends only the
headers in the first packet and the body in a subsequent one, there is
a risk that the check fails without waiting for more data. A failure
rate of about 1% was reported.

This fix must be backported to 1.4.

14 years ago[RELEASE] Released version 1.5-dev6
Willy Tarreau [Thu, 7 Apr 2011 22:56:41 +0000 (00:56 +0200)] 
[RELEASE] Released version 1.5-dev6

Released version 1.5-dev6 with the following main changes :
    - [BUG] stream_sock: use get_addr_len() instead of sizeof() on sockaddr_storage
    - [BUG] TCP source tracking was broken with IPv6 changes
    - [BUG] stick-tables did not work when converting IPv6 to IPv4
    - [CRITICAL] fix risk of crash when dealing with space in response cookies

14 years ago[CRITICAL] fix risk of crash when dealing with space in response cookies
Willy Tarreau [Thu, 7 Apr 2011 20:35:37 +0000 (22:35 +0200)] 
[CRITICAL] fix risk of crash when dealing with space in response cookies

When doing fix 24581bae022bcf97ea7818e49ef27d21c92d6aa3 to correctly handle
response cookies, an unfortunate typo was inserted in the less likely code
path, resulting in a risk of crash when cookie-based persistence is enabled
and the server emits a cookie with several spaces around the equal sign.

This bug was noticed during a code backport. Its effects were never reported
because this situation is very unlikely to appear, but it can be provoked on
purpose by the server.

This patch must be backported to 1.4 versions which contain the fix above
(anything > 1.4.8), and to similar 1.3 versions > 1.3.25. 1.5-dev versions
after 1.5-dev2 are affected too.

14 years ago[BUG] stick-tables did not work when converting IPv6 to IPv4
Willy Tarreau [Thu, 7 Apr 2011 08:50:19 +0000 (10:50 +0200)] 
[BUG] stick-tables did not work when converting IPv6 to IPv4

A stick-table of type IPv6 would store a wrong IPv4 address as the
result of an IPv6 to IPv4 conversion. This bug was introduced in
1.5-dev5.

14 years ago[BUG] TCP source tracking was broken with IPv6 changes
Willy Tarreau [Thu, 7 Apr 2011 08:44:39 +0000 (10:44 +0200)] 
[BUG] TCP source tracking was broken with IPv6 changes

John Helliwell reported a bug when using TCP source address
tracking on Solaris. The bug was introduced in haproxy 1.5-dev5.

14 years ago[BUG] stream_sock: use get_addr_len() instead of sizeof() on sockaddr_storage
Willy Tarreau [Tue, 5 Apr 2011 14:56:50 +0000 (16:56 +0200)] 
[BUG] stream_sock: use get_addr_len() instead of sizeof() on sockaddr_storage

John Helliwell reported a runtime issue on Solaris since 1.5-dev5. Traces
show that connect() returns EINVAL, which means the socket length is not
appropriate for the family. Solaris does not like being called with sizeof
and needs the address family's size on sockaddr_storage.

The fix consists in adding a get_addr_len() function which returns the
socket's address length based on its family. Tests show that this works
for both IPv4 and IPv6 addresses.

14 years ago[RELEASE] Released version 1.5-dev5
Willy Tarreau [Mon, 28 Mar 2011 23:10:33 +0000 (01:10 +0200)] 
[RELEASE] Released version 1.5-dev5

Released version 1.5-dev5 with the following main changes :
    - [BUG] standard: is_addr return value for IPv4 was inverted
    - [MINOR] update comment about IPv6 support for server
    - [MEDIUM] use getaddrinfo to resolve names if gethostbyname fail
    - [DOC] update IPv6 support for bind
    - [DOC] document IPv6 support for server
    - [DOC] fix a minor typo
    - [MEDIUM] IPv6 support for syslog
    - [DOC] document IPv6 support for syslog
    - [MEDIUM] IPv6 support for stick-tables
    - [DOC] document IPv6 support for stick-tables
    - [DOC] update ROADMAP file
    - [BUG] session: src_conn_cur was returning src_conn_cnt instead
    - [MINOR] frontend: add a make_proxy_line function
    - [MEDIUM] stream_sock: add support for sending the proxy protocol header line
    - [MEDIUM] server: add support for the "send-proxy" option
    - [DOC] update the spec on the proxy protocol
    - [BUILD] proto_tcp: fix build issue with CTTPROXY
    - [DOC] update ROADMAP file
    - [MEDIUM] config: rework the IPv4/IPv6 address parser to support host-only addresses
    - [MINOR] cfgparse: better report wrong listening addresses and make use of str2sa_range
    - [BUILD] add the USE_GETADDRINFO build option
    - [TESTS] provide a test case for various address formats
    - [BUG] session: conn_retries was not always initialized
    - [BUG] log: retrieve the target from the session, not the SI
    - [BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2)
    - [MINOR] tools: add two macros MID_RANGE and MAX_RANGE
    - [BUG] http: fix content-length handling on 32-bit platforms
    - [OPTIM] buffers: uninline buffer_forward()
    - [BUG] stream_sock: fix handling for server side PROXY protocol
    - [MINOR] acl: add support for table_cnt and table_avl matches
    - [DOC] update ROADMAP file

14 years ago[DOC] document IPv6 support for stick-tables
David du Colombier [Thu, 17 Mar 2011 09:40:24 +0000 (10:40 +0100)] 
[DOC] document IPv6 support for stick-tables

14 years ago[MEDIUM] IPv6 support for stick-tables
David du Colombier [Thu, 24 Mar 2011 10:09:31 +0000 (11:09 +0100)] 
[MEDIUM] IPv6 support for stick-tables

Since IPv6 is a different type than IPv4, the pattern fetch functions
src6 and dst6 were added. IPv6 stick-tables can also fetch IPv4 addresses
with src and dst. In this case, the IPv4 addresses are mapped to their
IPv6 counterpart, according to RFC 4291.

14 years ago[DOC] update ROADMAP file
Willy Tarreau [Mon, 28 Mar 2011 23:00:12 +0000 (01:00 +0200)] 
[DOC] update ROADMAP file

14 years ago[MINOR] acl: add support for table_cnt and table_avl matches
Willy Tarreau [Mon, 28 Mar 2011 22:57:02 +0000 (00:57 +0200)] 
[MINOR] acl: add support for table_cnt and table_avl matches

Those trivial matches respectively return the number of entries used
in a stick-table and the number of entries still available in a table.

14 years ago[BUG] stream_sock: fix handling for server side PROXY protocol
Willy Tarreau [Mon, 28 Mar 2011 21:17:54 +0000 (23:17 +0200)] 
[BUG] stream_sock: fix handling for server side PROXY protocol

Patch 5ab04ec47c9946a2bbc535687c023215ca813da0 was incomplete,
because if the first send() fails on an empty buffer, we fail
to rearm the polling and we can't establish the connection
anymore.

The issue was reported by Ben Timby who provided large amounts
of traces of various tests helping to reliably reproduce the issue.

14 years ago[DOC] document IPv6 support for syslog
David du Colombier [Thu, 17 Mar 2011 09:40:23 +0000 (10:40 +0100)] 
[DOC] document IPv6 support for syslog

14 years ago[MEDIUM] IPv6 support for syslog
David du Colombier [Thu, 24 Mar 2011 11:23:00 +0000 (12:23 +0100)] 
[MEDIUM] IPv6 support for syslog

14 years ago[OPTIM] buffers: uninline buffer_forward()
Willy Tarreau [Mon, 28 Mar 2011 14:25:58 +0000 (16:25 +0200)] 
[OPTIM] buffers: uninline buffer_forward()

Since the latest additions to buffer_forward(), it became too large for
inlining, so let's uninline it. The code size drops by 3kB. Should be
backported to 1.4 too.

14 years ago[BUG] http: fix content-length handling on 32-bit platforms
Willy Tarreau [Mon, 28 Mar 2011 14:06:28 +0000 (16:06 +0200)] 
[BUG] http: fix content-length handling on 32-bit platforms

Despite much care around handling the content-length as a 64-bit integer,
forwarding was broken on 32-bit platforms due to the 32-bit nature of
the ->to_forward member of the "buffer" struct. The issue is that this
member is declared as a long, so while it works OK on 64-bit platforms,
32-bit truncate the content-length to the lower 32-bits.

One solution could consist in turning to_forward to a long long, but it
is used a lot in the critical path, so it's not acceptable to perform
all buffer size computations on 64-bit there.

The fix consists in changing the to_forward member to a strict 32-bit
integer and ensure in buffer_forward() that only the amount of bytes
that can fit into it is considered. Callers of buffer_forward() are
responsible for checking that their data were taken into account. We
arbitrarily ensure we never consider more than 2G at once.

That's the way it was intended to work on 32-bit platforms except that
it did not.

This issue was tracked down hard at Exosec with Bertrand Jacquin,
Thierry Fournier and Julien Thomas. It remained undetected for a long
time because files larger than 4G are almost always transferred in
chunked-encoded format, and most platforms dealing with huge contents
these days run on 64-bit.

The bug affects all 1.5 and 1.4 versions, and must be backported.

14 years ago[MINOR] tools: add two macros MID_RANGE and MAX_RANGE
Willy Tarreau [Mon, 28 Mar 2011 13:55:43 +0000 (15:55 +0200)] 
[MINOR] tools: add two macros MID_RANGE and MAX_RANGE

Those will be used later, they return the largest and middle integer
possible for a given variable or type.

14 years ago[BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2)
Willy Tarreau [Tue, 1 Mar 2011 19:04:36 +0000 (20:04 +0100)] 
[BUG] http: fix possible incorrect forwarded wrapping chunk size (take 2)

Fix acd20f80 was incomplete, the computed "bytes" value was not used.

This fix must be backported to 1.4.

14 years ago[BUG] log: retrieve the target from the session, not the SI
Willy Tarreau [Sun, 27 Mar 2011 17:53:06 +0000 (19:53 +0200)] 
[BUG] log: retrieve the target from the session, not the SI

Since we now have the copy of the target in the session, use it instead
of relying on the SI for it. The SI drops the target upon unregister()
so applets such as stats were logged as "NOSRV".

14 years ago[BUG] session: conn_retries was not always initialized
Willy Tarreau [Sun, 27 Mar 2011 17:16:56 +0000 (19:16 +0200)] 
[BUG] session: conn_retries was not always initialized

Johannes Smith reported some wrong retries count in logs associated with bad
requests. The cause was that the conn_retries field in the stream interface
was only initialized when attempting to connect, but is used when logging,
possibly with an uninitialized value holding last connection's conn_retries.
This could have been avoided by making use of a stream interface initializer.

This bug is 1.5-specific.

14 years ago[TESTS] provide a test case for various address formats
Willy Tarreau [Fri, 4 Mar 2011 14:46:16 +0000 (15:46 +0100)] 
[TESTS] provide a test case for various address formats

14 years ago[DOC] fix a minor typo
David du Colombier [Thu, 17 Mar 2011 09:40:22 +0000 (10:40 +0100)] 
[DOC] fix a minor typo

14 years ago[DOC] document IPv6 support for server
David du Colombier [Thu, 17 Mar 2011 09:40:26 +0000 (10:40 +0100)] 
[DOC] document IPv6 support for server

14 years ago[DOC] update IPv6 support for bind
David du Colombier [Thu, 17 Mar 2011 09:40:27 +0000 (10:40 +0100)] 
[DOC] update IPv6 support for bind

14 years ago[BUILD] add the USE_GETADDRINFO build option
Willy Tarreau [Wed, 23 Mar 2011 19:00:53 +0000 (20:00 +0100)] 
[BUILD] add the USE_GETADDRINFO build option

This one is used to call getaddrinfo() to resolve IPv6 host names.

14 years ago[MEDIUM] use getaddrinfo to resolve names if gethostbyname fail
David du Colombier [Thu, 17 Mar 2011 09:40:16 +0000 (10:40 +0100)] 
[MEDIUM] use getaddrinfo to resolve names if gethostbyname fail

Function gethostbyname is deprecated since IEEE Std 1003.1-2008 and
was replaced by getaddrinfo (available since IEEE Std 1003.1-2004).
Contrary to gethostbyname, getaddrinfo is specified to support both
IPv4 and IPv4 addresses.
Since some libc doesn't handle getaddrinfo properly, constant
USE_GETADDRINFO must be defined at compile time to enable use of
getaddrinfo.

14 years ago[MINOR] cfgparse: better report wrong listening addresses and make use of str2sa_range
Willy Tarreau [Fri, 4 Mar 2011 14:43:13 +0000 (15:43 +0100)] 
[MINOR] cfgparse: better report wrong listening addresses and make use of str2sa_range

It's always been a mess to debug wrong listening addresses because
the parsing function does not indicate the file and line number. Now
it does. Since the code was almost a duplicate of str2sa_range, it
now makes use of it and has been sensibly reduced.

14 years ago[MINOR] update comment about IPv6 support for server
David du Colombier [Thu, 17 Mar 2011 09:40:28 +0000 (10:40 +0100)] 
[MINOR] update comment about IPv6 support for server

14 years ago[MEDIUM] config: rework the IPv4/IPv6 address parser to support host-only addresses
Willy Tarreau [Fri, 4 Mar 2011 14:31:53 +0000 (15:31 +0100)] 
[MEDIUM] config: rework the IPv4/IPv6 address parser to support host-only addresses

The parser now distinguishes between pure addresses and address:port. This
is useful for some config items where only an address is required.

Raw IPv6 addresses are now parsed, but IPv6 host name resolution is still not
handled (gethostbyname does not resolve IPv6 names to addresses).

14 years ago[BUG] standard: is_addr return value for IPv4 was inverted
David du Colombier [Tue, 22 Mar 2011 10:39:41 +0000 (11:39 +0100)] 
[BUG] standard: is_addr return value for IPv4 was inverted

14 years ago[DOC] update ROADMAP file
Willy Tarreau [Tue, 22 Mar 2011 13:38:00 +0000 (14:38 +0100)] 
[DOC] update ROADMAP file

14 years ago[BUILD] proto_tcp: fix build issue with CTTPROXY
Willy Tarreau [Sun, 20 Mar 2011 13:03:54 +0000 (14:03 +0100)] 
[BUILD] proto_tcp: fix build issue with CTTPROXY

Recent sockaddr_storage changes broke the almost unused cttproxy code.
Fix is obvious.

14 years ago[DOC] update the spec on the proxy protocol
Willy Tarreau [Sun, 20 Mar 2011 10:32:40 +0000 (11:32 +0100)] 
[DOC] update the spec on the proxy protocol

We now support it on the server side too.

14 years ago[MEDIUM] server: add support for the "send-proxy" option
Willy Tarreau [Sun, 20 Mar 2011 09:32:26 +0000 (10:32 +0100)] 
[MEDIUM] server: add support for the "send-proxy" option

This option enables use of the PROXY protocol with the server, which
allows haproxy to transport original client's address across multiple
architecture layers.

14 years ago[MEDIUM] stream_sock: add support for sending the proxy protocol header line
Willy Tarreau [Sun, 20 Mar 2011 09:16:46 +0000 (10:16 +0100)] 
[MEDIUM] stream_sock: add support for sending the proxy protocol header line

Upon connection establishment, stream_sock is now able to send a PROXY
line before sending any data. Since it's possible that the buffer is
already full, and we don't want to allocate a block for that line, we
compute it on-the-fly when we need it. We just store the offset from
which to (re-)send from the end of the line, since it's assumed that
multiple outputs of the same proxy line will be strictly equivalent. In
practice, one call is enough. We just make sure to handle the case where
the first send() would indicate an incomplete output, eventhough it's
very unlikely to ever happen.

14 years ago[MINOR] frontend: add a make_proxy_line function
Willy Tarreau [Sun, 20 Mar 2011 09:15:22 +0000 (10:15 +0100)] 
[MINOR] frontend: add a make_proxy_line function

This function will build a PROXY protocol line header from two addresses
(IPv4 or IPv6). AF_UNIX family will be reported as UNKNOWN.

14 years ago[BUG] session: src_conn_cur was returning src_conn_cnt instead
Willy Tarreau [Wed, 16 Mar 2011 05:55:50 +0000 (06:55 +0100)] 
[BUG] session: src_conn_cur was returning src_conn_cnt instead

Issue reported by Cory Forsyth and diagnosed by Cyril Bonté.
Just a plain stupid copy-paste of the wrong fetch function call.

14 years ago[DOC] update ROADMAP file
Willy Tarreau [Wed, 16 Mar 2011 05:54:36 +0000 (06:54 +0100)] 
[DOC] update ROADMAP file

14 years ago[RELEASE] Released version 1.5-dev4
Willy Tarreau [Sun, 13 Mar 2011 21:15:02 +0000 (22:15 +0100)] 
[RELEASE] Released version 1.5-dev4

Released version 1.5-dev4 with the following main changes :
    - [MINOR] cfgparse: Check whether the path given for the stats socket actually fits into the sockaddr_un structure to avoid truncation.
    - [MINOR] unix sockets : inherits the backlog size from the listener
    - [CLEANUP] unix sockets : move create_uxst_socket() in uxst_bind_listener()
    - [DOC] fix a minor typo
    - [DOC] fix ignore-persist documentation
    - [MINOR] add warnings on features not compatible with multi-process mode
    - [BUG] http: fix http-pretend-keepalive and httpclose/tunnel mode
    - [MINOR] stats: add support for several packets in stats admin
    - [BUG] stats: admin commands must check the proxy state
    - [BUG] stats: admin web interface must check the proxy state
    - [MINOR] http: add pattern extraction method to stick on query string parameter
    - [MEDIUM] add internal support for IPv6 server addresses
    - [MINOR] acl: add be_id/srv_id to match backend's and server's id
    - [MINOR] log: add support for passing the forwarded hostname
    - [MINOR] log: ability to override the syslog tag
    - [MINOR] checks: add PostgreSQL health check
    - [DOC] update ROADMAP file
    - [BUILD] pattern: use 'int' instead of 'int32_t'
    - [OPTIM] linux: add support for bypassing libc to force using vsyscalls
    - [BUG] debug: report the correct poller list in verbose mode
    - [BUG] capture: do not capture a cookie if there is no memory left
    - [BUG] appsession: fix possible double free in case of out of memory
    - [CRITICAL] cookies: mixing cookies in indirect mode and appsession can crash the process
    - [BUG] http: correctly update the header list when removing two consecutive headers
    - [BUILD] add the CPU=native and ARCH=32/64 build options
    - [BUILD] add -fno-strict-aliasing to fix warnings with gcc >= 4.4
    - [CLEANUP] hash: move the avalanche hash code globally available
    - [MEDIUM] hash: add support for an 'avalanche' hash-type
    - [DOC] update roadmap file
    - [BUG] http: do not re-enable the PROXY analyser on keep-alive
    - [OPTIM] http: don't send each chunk in a separate packet
    - [DOC] fix minor typos reported recently in the peers section
    - [DOC] fix another typo in the doc
    - [MINOR] stats: report HTTP message state and buffer flags in error dumps
    - [BUG] http chunking: don't report a parsing error on connection errors
    - [BUG] stream_interface: truncate buffers when sending error messages
    - [MINOR] http: support wrapping messages in error captures
    - [MINOR] http: capture incorrectly chunked message bodies
    - [MINOR] stats: add global event ID and count
    - [BUG] http: analyser optimizations broke pipelining
    - [CLEANUP] frontend: only apply TCP-specific settings to TCP/TCP6 sockets
    - [BUG] http: fix incorrect error reporting during data transfers
    - [CRITICAL] session: correctly leave turn-around and queue states on abort
    - [BUG] session: release slot before processing pending connections
    - [MINOR] tcp: add support for dynamic MSS setting
    - [BUG] stick-table: correctly terminate string keys during lookups
    - [BUG] acl: fix handling of empty lines in pattern files
    - [BUG] stick-table: use the private buffer when padding strings
    - [BUG] ebtree: fix ebmb_lookup() with len smaller than the tree's keys
    - [OPTIM] ebtree: ebmb_lookup: reduce stack usage by moving the return code out of the loop
    - [OPTIM] ebtree: inline ebst_lookup_len and ebis_lookup_len
    - [REVERT] undo the stick-table string key lookup fixes
    - [MINOR] http: improve url_param pattern extraction to ignore empty values
    - [BUILD] frontend: shut a warning with TCP_MAXSEG
    - [BUG] http: update the header list's tail when removing the last header
    - [DOC] fix minor typo in the proxy protocol doc
    - [DOC] fix typos (http-request instead of http-check)
    - [BUG] http: use correct ACL pointer when evaluating authentication
    - [BUG] cfgparse: correctly count one socket per port in ranges
    - [BUG] startup: set the rlimits before binding ports, not after.
    - [BUG] acl: srv_id must return no match when the server is NULL
    - [MINOR] acl: add ability to check for internal response-only parameters
    - [MINOR] acl: srv_id is only valid in responses
    - [MINOR] config: warn if response-only conditions are used in "redirect" rules
    - [BUG] acl: fd leak when reading patterns from file
    - [DOC] fix minor typo in "usesrc"
    - [BUG] http: fix possible incorrect forwarded wrapping chunk size
    - [BUG] http: fix computation of message body length after forwarding has started
    - [BUG] http: balance url_param did not work with first parameters on POST
    - [TESTS] update the url_param regression test to test check_post too
    - [DOC] update ROADMAP
    - [DOC] internal: reflect the fact that SI_ST_ASS is transient
    - [BUG] config: don't crash on empty pattern files.
    - [MINOR] stream_interface: make use of an applet descriptor for IO handlers
    - [REORG] stream_interface: move the st0, st1 and private members to the applet
    - [REORG] stream_interface: split the struct members in 3 parts
    - [REORG] session: move client and server address to the stream interface
    - [REORG] tcp: make tcpv4_connect_server() take the target address from the SI
    - [MEDIUM] stream_interface: store the target pointer and type
    - [CLEANUP] stream_interface: remove the applet.handler pointer
    - [MEDIUM] log: take the logged server name from the stream interface
    - [CLEANUP] session: remove data_source from struct session
    - [CLEANUP] stats: make all dump functions only rely on the stream interface
    - [REORG] session: move the data_ctx struct to the stream interface's applet
    - [MINOR] proxy: add PR_O2_DISPATCH to detect dispatch mode
    - [MINOR] cfgparse: only keep one of dispatch, transparent, http_proxy
    - [MINOR] session: add a pointer to the new target into the session
    - [MEDIUM] session: remove s->prev_srv which is not needed anymore
    - [CLEANUP] stream_interface: use inline functions to manipulate targets
    - [MAJOR] session: remove the ->srv pointer from struct session
    - [MEDIUM] stats: split frontend and backend stats
    - [MEDIUM] http: always evaluate http-request rules before stats http-request
    - [REORG] http: move the http-request rules to proto_http
    - [BUG] http: stats were not incremented on http-request deny
    - [MINOR] checks: report it if checks fail due to socket creation error

14 years ago[MINOR] checks: report it if checks fail due to socket creation error
Willy Tarreau [Wed, 9 Mar 2011 19:38:33 +0000 (20:38 +0100)] 
[MINOR] checks: report it if checks fail due to socket creation error

If the check fails for a low-level socket error (eg: address family not
supportd), we currently ignore the status. We must report the error and
declare a failed health check in this case. The only real reason for this
would be when an IPv6 check is required on an IPv4-only system.

14 years ago[BUG] http: stats were not incremented on http-request deny
Willy Tarreau [Thu, 6 Jan 2011 17:19:50 +0000 (18:19 +0100)] 
[BUG] http: stats were not incremented on http-request deny

A counter increase was missing here.
This should be backported to 1.4 with care, as the code has changed a bit.

14 years ago[REORG] http: move the http-request rules to proto_http
Willy Tarreau [Thu, 6 Jan 2011 16:51:27 +0000 (17:51 +0100)] 
[REORG] http: move the http-request rules to proto_http

And also rename "req_acl_rule" "http_req_rule". At the beginning that
was a bit confusing to me, especially the "req_acl" list which in fact
holds what we call rules. After some digging, it appeared that some
part of the code is 100% HTTP and not just related to authentication
anymore, so let's move that part to HTTP and keep the auth-only code
in auth.c.