]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
15 years ago[MINOR] stats socket: add show sess <id> to dump details about a session
Willy Tarreau [Fri, 5 Mar 2010 16:53:32 +0000 (17:53 +0100)] 
[MINOR] stats socket: add show sess <id> to dump details about a session

When trying to spot some complex bugs, it's often needed to access
information on stuck sessions, which is quite difficult. This new
command helps one get detailed information about a session, with
flags, timers, states, etc... The buffer data are not dumped yet.

15 years ago[MINOR] stats: make the data dump function reusable for other purposes
Willy Tarreau [Fri, 5 Mar 2010 13:58:26 +0000 (14:58 +0100)] 
[MINOR] stats: make the data dump function reusable for other purposes

The dump_error_line() function was limited to dump error buffers while
it's perfectly suitable to dump anything else.

15 years ago[MINOR] stats: don't send empty lines in "show errors"
Willy Tarreau [Fri, 5 Mar 2010 16:42:58 +0000 (17:42 +0100)] 
[MINOR] stats: don't send empty lines in "show errors"

Empty lines indicate end of dump, so it's important not to do that.
Send a single space instead.

15 years ago[MINOR] proto_uxst: set accept_date upon accept() to the wall clock time
Willy Tarreau [Fri, 5 Mar 2010 15:18:37 +0000 (16:18 +0100)] 
[MINOR] proto_uxst: set accept_date upon accept() to the wall clock time

This accept_date field was not set and will be reported in the stats as
the connection's accept date.

15 years ago[BUG] http: don't wait for response data to leave buffer is client has left
Willy Tarreau [Fri, 5 Mar 2010 09:41:54 +0000 (10:41 +0100)] 
[BUG] http: don't wait for response data to leave buffer is client has left

In case of pipelined requests, if the client aborts before reading response
N-1, haproxy waits forever for the data to leave the buffer before parsing
the next response.

15 years ago[CLEANUP] session: remove duplicate test
Willy Tarreau [Fri, 5 Mar 2010 09:11:01 +0000 (10:11 +0100)] 
[CLEANUP] session: remove duplicate test

This duplicate test should have been removed with the loop rework but was forgotten.
It was harmless, but disassembly shows that it prevents gcc from correctly optimizing
the loop.

15 years ago[RELEASE] Released version 1.4.1 v1.4.1
Willy Tarreau [Thu, 4 Mar 2010 22:39:19 +0000 (23:39 +0100)] 
[RELEASE] Released version 1.4.1

Released version 1.4.1 with the following main changes :
    - [BUG] Clear-cookie path issue
    - [DOC] fix typo on stickiness rules
    - [BUILD] fix BSD and OSX makefiles for missing files
    - [BUILD] includes order breaks OpenBSD build
    - [BUILD] fix some build warnings on Solaris with is* macros
    - [BUG] logs: don't report "last data" when we have just closed after an error
    - [BUG] logs: don't report "proxy request" when server closes early
    - [BUILD] fix platform-dependant build issues related to crypt()
    - [STATS] count transfer aborts caused by client and by server
    - [STATS] frontend requests were not accounted for failed requests
    - [MINOR] report total number of processed connections when stopping a proxy
    - [DOC] be more clear about the limitation to one single monitor-net entry

15 years ago[DOC] be more clear about the limitation to one single monitor-net entry
Willy Tarreau [Thu, 4 Mar 2010 22:36:33 +0000 (23:36 +0100)] 
[DOC] be more clear about the limitation to one single monitor-net entry

It was not clear in the doc that only one monitor-net entry is supported.

15 years ago[BUG] Clear-cookie path issue
William Turner [Mon, 1 Mar 2010 18:30:34 +0000 (13:30 -0500)] 
[BUG] Clear-cookie path issue

We have been using haproxy to balance a not very well written application
(http://www.blackboard.com/). Using the "insert postonly indirect" cookie
method, I was attempting to remove the cookie when users would logout,
allowing the machine to re-balance for the next user (this application is
used in school computer labs, so a computer might stay on the whole day
but be used on and off).

I was having a lot of trouble because when the cookie was set, it was with
"Path=/", but when being cleared there was no "Path" in the set cookie
header, and because the logout page was in a different place of the
website (which I couldn't change), the cookie would not be cleared. I
don't know if this would be a problem for anyone other than me (as our
HTTP application is so un-adjustable), but just in case, I have included
the patch I used. Maybe it will help someone else.

[ WT: this was a correct fix, and I also added the same missing path to
  the set-cookie option ]

15 years ago[MINOR] report total number of processed connections when stopping a proxy
Willy Tarreau [Thu, 4 Mar 2010 22:07:28 +0000 (23:07 +0100)] 
[MINOR] report total number of processed connections when stopping a proxy

It's sometimes convenient to know if a proxy has processed any connection
at all when stopping it. Since a soft restart causes the "Proxy stopped"
message to be logged for each proxy, let's add the number of connections
so that it's possible afterwards to check whether a proxy had received
any connection.

15 years ago[STATS] frontend requests were not accounted for failed requests
Willy Tarreau [Thu, 4 Mar 2010 22:02:38 +0000 (23:02 +0100)] 
[STATS] frontend requests were not accounted for failed requests

But failed requests were accounted for, resulting in more failures
than requests.

15 years ago[STATS] count transfer aborts caused by client and by server
Willy Tarreau [Thu, 4 Mar 2010 19:34:23 +0000 (20:34 +0100)] 
[STATS] count transfer aborts caused by client and by server

Often we need to understand why some transfers were aborted or what
constitutes server response errors. With those two counters, it is
now possible to detect an unexpected transfer abort during a data
phase (eg: too short HTTP response), and to know what part of the
server response errors may in fact be assigned to aborted transfers.

15 years ago[BUILD] fix platform-dependant build issues related to crypt()
Willy Tarreau [Thu, 4 Mar 2010 18:10:14 +0000 (19:10 +0100)] 
[BUILD] fix platform-dependant build issues related to crypt()

Holger Just and Ross West reported build issues on FreeBSD and
Solaris that were initially caused by the definition of
_XOPEN_SOURCE at the top of auth.c, which was required on Linux
to avoid a build warning.

Krzysztof Oledzki found that using _GNU_SOURCE instead also worked
on Linux and did not cause any issue on several versions of FreeBSD.
Solaris still reported a warning this time, which was fixed by
including <crypt.h>, which itself is not present on FreeBSD nor on
all Linux toolchains.

So by adding a new build option (NEED_CRYPT_H), we can get Solaris
to get crypt() working and stop complaining at the same time, without
impacting other platforms.

This fix was tested at least on several linux toolchains (at least
uclibc, glibc 2.2.5, 2.3.6 and 2.7), on FreeBSD 4 to 8, Solaris 8
(which needs crypt.h), and AIX 5.3 (without crypt.h).

Every time it builds without a warning.

15 years ago[BUG] logs: don't report "proxy request" when server closes early
Willy Tarreau [Thu, 4 Mar 2010 17:14:51 +0000 (18:14 +0100)] 
[BUG] logs: don't report "proxy request" when server closes early

A copy-paste typo and a missing check were causing the logs to
report "PR" instead of "SD" when a server closes before sending
full data. Also, the log would erroneously report 502 while in
fact the correct response will already have been transmitted.

15 years ago[BUG] logs: don't report "last data" when we have just closed after an error
Willy Tarreau [Thu, 4 Mar 2010 16:54:21 +0000 (17:54 +0100)] 
[BUG] logs: don't report "last data" when we have just closed after an error

Some people have reported seeing "SL" flags in their logs quite often while
this should never happen. The reason was that then a server error is detected,
we close the connection to that server and when we decide what state we were
in, we see the connection is closed, and deduce it was the last data transfer,
which is wrong. We should report DATA if the previous state was an established
state, which this patch does.

Now logs correctly report "SD" and not "SL" when a server resets a connection
before the end of the transfer.

15 years ago[BUILD] fix some build warnings on Solaris with is* macros
Willy Tarreau [Tue, 2 Mar 2010 23:16:00 +0000 (00:16 +0100)] 
[BUILD] fix some build warnings on Solaris with is* macros

isalnum, isdigit and friends are really annoying because they take
an int in which we should pass an unsigned char, while strings
everywhere use chars. Solaris uses macros relying on an array for
those functions, which easily triggers some warnings showing where
we have mistakenly passed a char instead of an unsigned char or an
int. Those warnings may indicate real bugs on some platforms
depending on the implementation.

15 years ago[BUILD] includes order breaks OpenBSD build
Willy Tarreau [Fri, 26 Feb 2010 21:00:19 +0000 (22:00 +0100)] 
[BUILD] includes order breaks OpenBSD build

Jeff Buchbinder reported that OpenBSD build broke on compat.h,
and that this patch fixes the issue.

15 years ago[BUILD] fix BSD and OSX makefiles for missing files
Willy Tarreau [Fri, 26 Feb 2010 20:36:32 +0000 (21:36 +0100)] 
[BUILD] fix BSD and OSX makefiles for missing files

Jeff Buchbinder reported that OpenBSD build broke because recently
added files were not ported to BSD and OSX makefiles.

15 years ago[DOC] fix typo on stickiness rules
Willy Tarreau [Fri, 26 Feb 2010 18:15:04 +0000 (19:15 +0100)] 
[DOC] fix typo on stickiness rules

15 years ago[RELEASE] Released version 1.4.0 v1.4.0
Willy Tarreau [Fri, 26 Feb 2010 13:55:22 +0000 (14:55 +0100)] 
[RELEASE] Released version 1.4.0

Released version 1.4.0 with the following main changes :
    - [MINOR] stats: report maint state for tracking servers too
    - [DOC] fix summary to add pattern extraction
    - [DOC] Documentation cleanups
    - [BUG] cfgparse memory leak and missing free calls in deinit()
    - [BUG] pxid/puid/luid: don't shift IDs when some of them are forced
    - [EXAMPLES] add auth.cfg
    - [BUG] uri_auth: ST_SHLGNDS should be 0x00000008 not 0x0000008
    - [BUG] uri_auth: do not attemp to convert uri_auth -> http-request more than once
    - [BUILD] auth: don't use unnamed unions
    - [BUG] config: report unresolvable host names as errors
    - [BUILD] fix build breakage with DEBUG_FULL
    - [DOC] fix a typo about timeout check and clarify the explanation.
    - [MEDIUM] http: don't use trash to realign large buffers
    - [STATS] report HTTP requests (total and rate) in frontends
    - [STATS] separate frontend and backend HTTP stats
    - [MEDIUM] http: revert to use a swap buffer for realignment
    - [MINOR] stats: report the request rate in frontends as cell titles
    - [MINOR] stats: mark areas with an underline when tooltips are available
    - [DOC] reorder some entries to maintain the alphabetical order
    - [DOC] cleanup of the keyword matrix

15 years ago[DOC] cleanup of the keyword matrix
Willy Tarreau [Fri, 26 Feb 2010 12:34:29 +0000 (13:34 +0100)] 
[DOC] cleanup of the keyword matrix

The keyword matrix was barely readable due to the long lines.
Also let's repeat the legend every 24 lines.

15 years ago[DOC] reorder some entries to maintain the alphabetical order
Willy Tarreau [Fri, 26 Feb 2010 11:56:52 +0000 (12:56 +0100)] 
[DOC] reorder some entries to maintain the alphabetical order

15 years ago[MINOR] stats: mark areas with an underline when tooltips are available
Willy Tarreau [Fri, 26 Feb 2010 11:29:07 +0000 (12:29 +0100)] 
[MINOR] stats: mark areas with an underline when tooltips are available

There are many information available in the stats page that can only
be seen when the mouse hovers over them. But it's hard to know where
those information are. Now with a discrete dotted underline it's easier
to spot those areas.

15 years ago[MINOR] stats: report the request rate in frontends as cell titles
Willy Tarreau [Fri, 26 Feb 2010 10:35:39 +0000 (11:35 +0100)] 
[MINOR] stats: report the request rate in frontends as cell titles

The current and max request rates are now reported when the mouse flies
over the session rate cur/max. The total requests is displayed with the
status codes over the total sessions cell.

15 years ago[MEDIUM] http: revert to use a swap buffer for realignment
Willy Tarreau [Fri, 26 Feb 2010 10:12:27 +0000 (11:12 +0100)] 
[MEDIUM] http: revert to use a swap buffer for realignment

The bounce realign function was algorithmically good but as expected
it was not cache-friendly. Using it with large requests caused so many
cache thrashing that the function itself could drain 70% of the total
CPU time for only 0.5% of the calls !

Revert back to a standard memcpy() using a specially allocated swap
buffer. We're now back to 2M req/s on pipelined requests.

15 years ago[STATS] separate frontend and backend HTTP stats
Willy Tarreau [Fri, 26 Feb 2010 09:30:28 +0000 (10:30 +0100)] 
[STATS] separate frontend and backend HTTP stats

It is wrong to merge FE and BE stats for a proxy because when we consult a
BE's stats, it reflects the FE's stats eventhough the BE has received no
traffic. The most common example happens with listen instances, where the
backend gets credited for all the trafic even when a use_backend rule makes
use of another backend.

15 years ago[STATS] report HTTP requests (total and rate) in frontends
Willy Tarreau [Fri, 26 Feb 2010 09:05:55 +0000 (10:05 +0100)] 
[STATS] report HTTP requests (total and rate) in frontends

Now that we support keep-alive, it's important to report a separate
counter for requests. Right now it just appears in the CSV output.

15 years ago[MEDIUM] http: don't use trash to realign large buffers
Willy Tarreau [Thu, 25 Feb 2010 22:54:31 +0000 (23:54 +0100)] 
[MEDIUM] http: don't use trash to realign large buffers

The trash buffer may now be smaller than a buffer because we can tune
it at run time. This causes a risk when we're trying to use it as a
temporary buffer to realign unaligned requests, because we may have to
put up to a full buffer into it.

Instead of doing a double copy, we're now relying on an open-coded
bouncing copy algorithm. The principle is that we move one byte at
a time to its final place, and if that place also holds a byte, then
we move it too, and so on. We finish when we've moved all the buffer.
It limits the number of memory accesses, but since it proceeds one
byte at a time and with random walk, it's not cache friendly and
should be slower than a double copy. However, it's only used in
extreme situations and the difference will not be noticeable.

It has been extensively tested and works reliably.

15 years ago[BUG] uri_auth: do not attemp to convert uri_auth -> http-request more than once
Krzysztof Piotr Oledzki [Mon, 22 Feb 2010 19:27:23 +0000 (20:27 +0100)] 
[BUG] uri_auth: do not attemp to convert uri_auth -> http-request more than once

Bug reported by Laurent Dolosor.

15 years ago[BUG] uri_auth: ST_SHLGNDS should be 0x00000008 not 0x0000008
Krzysztof Piotr Oledzki [Mon, 22 Feb 2010 18:29:40 +0000 (19:29 +0100)] 
[BUG] uri_auth: ST_SHLGNDS should be 0x00000008 not 0x0000008

15 years ago[DOC] fix a typo about timeout check and clarify the explanation.
Willy Tarreau [Wed, 10 Feb 2010 04:10:19 +0000 (05:10 +0100)] 
[DOC] fix a typo about timeout check and clarify the explanation.

15 years ago[BUILD] fix build breakage with DEBUG_FULL
Willy Tarreau [Tue, 9 Feb 2010 19:55:44 +0000 (20:55 +0100)] 
[BUILD] fix build breakage with DEBUG_FULL

Paul Hirose reported a build error when DEBUG_FULL is set.

15 years ago[BUG] config: report unresolvable host names as errors
Willy Tarreau [Tue, 9 Feb 2010 19:50:45 +0000 (20:50 +0100)] 
[BUG] config: report unresolvable host names as errors

When a host name could not be resolved, an alert was emitted but the
service used to start with 0.0.0.0 for the IP address, because the
address parsing functions could not report an error. This is now
changed. This fix must be backported to 1.3 as it was first discovered
there.

15 years ago[EXAMPLES] add auth.cfg
Krzysztof Piotr Oledzki [Sun, 7 Feb 2010 15:50:08 +0000 (16:50 +0100)] 
[EXAMPLES] add auth.cfg

15 years ago[DOC] Documentation cleanups
Cyril Bonté [Sat, 6 Feb 2010 13:44:47 +0000 (14:44 +0100)] 
[DOC] Documentation cleanups

Hi Willy,

This patch make some cleanups on the documentation :
- strictly respect the 80 columns constraint
- use space indentation everywhere
- add some missing "(deprecated)"
- fix the "monitor fail" keyword syntax
- fix a keyword in a "See Also" line (interval instead of inter)
- the "no" prefix of "option http-use-proxy-header" is displayed as the others

I've also noticed that 3 keywords are missing from the keywords reference (I don't know what to do for that) :
- dispatch
- reqsetbe
- reqisetbe

--
Cyril Bonté

15 years ago[BUG] pxid/puid/luid: don't shift IDs when some of them are forced
Krzysztof Piotr Oledzki [Fri, 5 Feb 2010 19:58:27 +0000 (20:58 +0100)] 
[BUG] pxid/puid/luid: don't shift IDs when some of them are forced

[WT: it was not a bug, I did it on purpose to leave no hole between IDs,
 though it's not very practical when admins want to force some entries
 after they have been used, because they'd rather leave a hole than
 renumber everything ]

Forcing some of IDs should not shift others.

Regression introduced in 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5

---cut here---
global
        stats socket /home/ole/haproxy.stat user ole group ole mode 660

frontend F1
        bind 127.0.0.1:9999
        mode http

backend B1
        mode http

backend B2
        mode http
        id 9999

backend B3
        mode http

backend B4
        mode http
---cut here---

Before 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
4
5

After 53fb4ae261b6e0e33e618f5cabbacc1657c19cc5:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
3
4

With this patch:
$ echo "show stat" | socat unix-connect:/home/ole/haproxy.stat stdio|cut -d , -f 28
iid
1
2
9999
4
5

15 years ago[BUG] cfgparse memory leak and missing free calls in deinit()
Krzysztof Piotr Oledzki [Fri, 5 Feb 2010 19:31:44 +0000 (20:31 +0100)] 
[BUG] cfgparse memory leak and missing free calls in deinit()

Thich patch fixes cfgparser not to leak memory on each
default server statement and adds several missing free
calls in deinit():
 - free(l->name)
 - free(l->counters)
 - free(p->desc);
 - free(p->fwdfor_hdr_name);

None of them are critical, hopefully.

15 years ago[DOC] fix summary to add pattern extraction
Cyril Bonté [Wed, 3 Feb 2010 19:41:26 +0000 (20:41 +0100)] 
[DOC] fix summary to add pattern extraction

15 years ago[MINOR] stats: report maint state for tracking servers too
Cyril Bonté [Tue, 2 Feb 2010 23:26:28 +0000 (00:26 +0100)] 
[MINOR] stats: report maint state for tracking servers too

This is to avoid confusing a real server failure and a tracking server
which is marked down because the tracked server was switched to MAINT.

15 years ago[BUILD] auth: don't use unnamed unions
Willy Tarreau [Tue, 2 Feb 2010 10:28:20 +0000 (11:28 +0100)] 
[BUILD] auth: don't use unnamed unions

unnamed unions are not compatible with older compilers (eg: gcc 2.95) so
name it "u" instead.

15 years ago[RELEASE] Released version 1.4-rc1 v1.4-rc1
Willy Tarreau [Tue, 2 Feb 2010 09:18:28 +0000 (10:18 +0100)] 
[RELEASE] Released version 1.4-rc1

Released version 1.4-rc1 with the following main changes :
    - [MEDIUM] add a maintenance mode to servers
    - [MINOR] http-auth: last fix was wrong
    - [CONTRIB] add base64rev-gen.c that was used to generate the base64rev table.
    - [MINOR] Base64 decode
    - [MINOR] generic auth support with groups and encrypted passwords
    - [MINOR] add ACL_TEST_F_NULL_MATCH
    - [MINOR] http-request: allow/deny/auth support for frontend/backend/listen
    - [MINOR] acl: add http_auth and http_auth_group
    - [MAJOR] use the new auth framework for http stats
    - [DOC] add info about userlists, http-request and http_auth/http_auth_group acls
    - [STATS] make it possible to change a CLI connection timeout
    - [BUG] patterns: copy-paste typo in type conversion arguments
    - [MINOR] pattern: make the converter more flexible by supporting void* and int args
    - [MINOR] standard: str2mask: string to netmask converter
    - [MINOR] pattern: add support for argument parsers for converters
    - [MINOR] pattern: add the "ipmask()" converting function
    - [MINOR] config: off-by-one in "stick-table" after list of converters
    - [CLEANUP] acl, patterns: make use of my_strndup() instead of malloc+memcpy
    - [BUG] restore accidentely removed line in last patch !
    - [MINOR] checks: make the HTTP check code add the CRLF itself
    - [MINOR] checks: add the server's status in the checks
    - [BUILD] halog: make without arch-specific optimizations
    - [BUG] halog: fix segfault in case of empty log in PCT mode (cherry picked from commit fe362fe4762151d209b9656639ee1651bc2b329d)
    - [MINOR] http: disable keep-alive when process is going down
    - [MINOR] acl: add build_acl_cond() to make it easier to add ACLs in config
    - [CLEANUP] config: use build_acl_cond() instead of parse_acl_cond()
    - [CLEANUP] config: use warnif_cond_requires_resp() to check for bad ACLs
    - [MINOR] prepare req_*/rsp_* to receive a condition
    - [CLEANUP] config: specify correct const char types to warnif_* functions
    - [MEDIUM] config: factor out the parsing of 20 req*/rsp* keywords
    - [MEDIUM] http: make the request filter loop check for optional conditions
    - [MEDIUM] http: add support for conditional request filter execution
    - [DOC] add some build info about the AIX platform (cherry picked from commit e41914c77edbc40aebf827b37542d37d758e371e)
    - [MEDIUM] http: add support for conditional request header addition
    - [MEDIUM] http: add support for conditional response header rewriting
    - [DOC] add some missing ACLs about response header matching
    - [MEDIUM] http: add support for proxy authentication
    - [MINOR] http-auth: make the 'unless' keyword work as expected
    - [CLEANUP] config: use build_acl_cond() to simplify http-request ACL parsing
    - [MEDIUM] add support for anonymous ACLs
    - [MEDIUM] http: switch to tunnel mode after status 101 responses
    - [MEDIUM] http: stricter processing of the CONNECT method
    - [BUG] config: reset check request to avoid double free when switching to ssl/sql
    - [MINOR] config: fix too large ssl-hello-check message.
    - [BUG] fix error response in case of server error

15 years ago[BUG] fix error response in case of server error
Willy Tarreau [Tue, 2 Feb 2010 08:57:24 +0000 (09:57 +0100)] 
[BUG] fix error response in case of server error

The fix below was incomplete :
    commit d5fd51c75be6479539228f84377622a986b23be2

    [BUG] http_server_error() must not purge a previous pending response

    This can cause parts of responses to be truncated in case of
    pipelined requests if the second request generates an error
    before the first request is completely flushed.

Pending response data being rejected was still sent, causing inappropriate
error responses in case of error while parsing a response header. We must
purge pending data from the response buffer that were not scheduled to be
sent (l - send_max).

15 years ago[DOC] add info about userlists, http-request and http_auth/http_auth_group acls
Krzysztof Piotr Oledzki [Mon, 1 Feb 2010 22:35:44 +0000 (23:35 +0100)] 
[DOC] add info about userlists, http-request and http_auth/http_auth_group acls

15 years ago[MINOR] config: fix too large ssl-hello-check message.
Willy Tarreau [Mon, 1 Feb 2010 15:38:17 +0000 (16:38 +0100)] 
[MINOR] config: fix too large ssl-hello-check message.

As reported by Cyril Bonté and Hervé Commowick, the ssl-hello-check
should use sizeof()-1 and not sizeof() for the message length.

15 years ago[BUG] config: reset check request to avoid double free when switching to ssl/sql
Willy Tarreau [Mon, 1 Feb 2010 15:31:14 +0000 (16:31 +0100)] 
[BUG] config: reset check request to avoid double free when switching to ssl/sql

SSL and SQL checks did only perform a free() of the request without replacing
it, so having multiple SSL/SQL check declarations after another check type
causes a double free condition during config parsing. This should be backported
although it's harmless.

15 years ago[MEDIUM] http: stricter processing of the CONNECT method
Willy Tarreau [Mon, 1 Feb 2010 15:20:08 +0000 (16:20 +0100)] 
[MEDIUM] http: stricter processing of the CONNECT method

Now we establish the tunnel only once the status 200 reponse is
received. That way we can still support an authentication request
in response to a CONNECT, then a client's authentication response.

15 years ago[MEDIUM] http: switch to tunnel mode after status 101 responses
Willy Tarreau [Mon, 1 Feb 2010 14:13:32 +0000 (15:13 +0100)] 
[MEDIUM] http: switch to tunnel mode after status 101 responses

A 101 response is accompanied with an Upgrade header indicating
a new protocol that is spoken on the connection after the exchange
completes. At least we should switch to tunnel mode after such a
response.

15 years ago[MEDIUM] add support for anonymous ACLs
Willy Tarreau [Mon, 1 Feb 2010 12:05:50 +0000 (13:05 +0100)] 
[MEDIUM] add support for anonymous ACLs

Anonymous ACLs allow the declaration of rules which rely directly on
ACL expressions without passing via the declaration of an ACL. Example :

   With named ACLs :

        acl site_dead nbsrv(dynamic) lt 2
        acl site_dead nbsrv(static)  lt 2
        monitor fail  if site_dead

   With anonymous ACLs :

        monitor fail if { nbsrv(dynamic) lt 2 } || { nbsrv(static) lt 2 }

15 years ago[MINOR] http-auth: last fix was wrong
Krzysztof Olędzki [Mon, 1 Feb 2010 11:36:53 +0000 (12:36 +0100)] 
[MINOR] http-auth: last fix was wrong

I'm not sure if the fix is correct:

- if (req_acl->cond)
-         ret = acl_exec_cond(req_acl->cond, px, s, txn, ACL_DIR_REQ);
+ if (!req_acl->cond)
+         continue;

Doesn't it ignore rules with no condition attached? I think that the
proper solution would be the following.

15 years ago[CLEANUP] config: use build_acl_cond() to simplify http-request ACL parsing
Willy Tarreau [Mon, 1 Feb 2010 09:43:44 +0000 (10:43 +0100)] 
[CLEANUP] config: use build_acl_cond() to simplify http-request ACL parsing

Now that we have this new function to make your life better, use it.

15 years ago[MINOR] http-auth: make the 'unless' keyword work as expected
Willy Tarreau [Mon, 1 Feb 2010 09:40:19 +0000 (10:40 +0100)] 
[MINOR] http-auth: make the 'unless' keyword work as expected

One check was missing for the 'polarity' of the test. Now 'unless'
works. BTW, 'unless' provides a nice way to perform one-line auth :

    acl valid-user http_auth(user-list)
    http-request auth unless valid-user

15 years ago[MEDIUM] add a maintenance mode to servers
Cyril Bonté [Sun, 31 Jan 2010 21:34:03 +0000 (22:34 +0100)] 
[MEDIUM] add a maintenance mode to servers

This is a first attempt to add a maintenance mode on servers, using
the stat socket (in admin level).

It can be done with the following command :
   - disable server <backend>/<server>
   - enable  server <backend>/<server>

In this mode, no more checks will be performed on the server and it
will be marked as a special DOWN state (MAINT).

If some servers were tracking it, they'll go DOWN until the server
leaves the maintenance mode. The stats page and the CSV export also
display this special state.

This can be used to disable the server in haproxy before doing some
operations on this server itself. This is a good complement to the
"http-check disable-on-404" keyword and works in TCP mode.

15 years ago[MEDIUM] http: add support for proxy authentication
Willy Tarreau [Sun, 31 Jan 2010 20:46:18 +0000 (21:46 +0100)] 
[MEDIUM] http: add support for proxy authentication

We're already able to know if a request is a proxy request or a
normal one, and we have an option "http-use-proxy-header" which states
that proxy headers must be checked. So let's switch to use the proxy
authentication headers and responses when this option is set and we're
facing a proxy request. That allows haproxy to enforce auth in front
of a proxy.

15 years ago[MAJOR] use the new auth framework for http stats
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 18:29:32 +0000 (19:29 +0100)] 
[MAJOR] use the new auth framework for http stats

Support the new syntax (http-request allow/deny/auth) in
http stats.

Now it is possible to use the same syntax is the same like in
the frontend/backend http-request access control:
 acl src_nagios src 192.168.66.66
 acl stats_auth_ok http_auth(L1)

 stats http-request allow if src_nagios
 stats http-request allow if stats_auth_ok
 stats http-request auth realm LB

The old syntax is still supported, but now it is emulated
via private acls and an aditional userlist.

15 years ago[MINOR] acl: add http_auth and http_auth_group
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 18:26:18 +0000 (19:26 +0100)] 
[MINOR] acl: add http_auth and http_auth_group

Add two acls to match http auth data:
 acl <name> http_auth(userlist)
 acl <name> http_auth_hroup(userlist) group1 group2 (...)

15 years ago[MINOR] http-request: allow/deny/auth support for frontend/backend/listen
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 16:58:21 +0000 (17:58 +0100)] 
[MINOR] http-request: allow/deny/auth support for frontend/backend/listen

Use the generic auth framework to control access to frontends/backends/listens

15 years ago[MINOR] add ACL_TEST_F_NULL_MATCH
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 16:55:53 +0000 (17:55 +0100)] 
[MINOR] add ACL_TEST_F_NULL_MATCH

Add ACL_TEST_F_NULL_MATCH so expr->kw->match can be called
even if expr->patterns is empty.

15 years ago[MINOR] generic auth support with groups and encrypted passwords
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 16:50:44 +0000 (17:50 +0100)] 
[MINOR] generic auth support with groups and encrypted passwords

Add generic authentication & authorization support.

Groups are implemented as bitmaps so the count is limited to
sizeof(int)*8 == 32.

Encrypted passwords are supported with libcrypt and crypt(3), so it is
possible to use any method supported by your system. For example modern
Linux/glibc instalations support MD5/SHA-256/SHA-512 and of course classic,
DES-based encryption.

15 years ago[MINOR] Base64 decode
Krzysztof Piotr Oledzki [Fri, 29 Jan 2010 12:36:23 +0000 (13:36 +0100)] 
[MINOR] Base64 decode

Implement Base64 decoding with a reverse table.

The function accepts and decodes classic base64 strings, which
can be composed from many streams as long each one is properly
padded, for example: SGVsbG8=IEhBUHJveHk=IQ==

15 years ago[CONTRIB] add base64rev-gen.c that was used to generate the base64rev table.
Krzysztof Piotr Oledzki [Tue, 26 Jan 2010 11:32:49 +0000 (12:32 +0100)] 
[CONTRIB] add base64rev-gen.c that was used to generate the base64rev table.

There is no offcial reverse table for base64, so a short
program is required to generate one.

15 years ago[DOC] add some missing ACLs about response header matching
Willy Tarreau [Sun, 31 Jan 2010 14:54:35 +0000 (15:54 +0100)] 
[DOC] add some missing ACLs about response header matching

15 years ago[MEDIUM] http: add support for conditional response header rewriting
Willy Tarreau [Sun, 31 Jan 2010 14:43:27 +0000 (15:43 +0100)] 
[MEDIUM] http: add support for conditional response header rewriting

Just as for the req* rules, we can now condition rsp* rules with ACLs.
ACLs match on response, so volatile request information cannot be used.
A warning is emitted if a configuration contains such an anomaly.

15 years ago[MEDIUM] http: add support for conditional request header addition
Willy Tarreau [Sun, 31 Jan 2010 13:30:44 +0000 (14:30 +0100)] 
[MEDIUM] http: add support for conditional request header addition

Now the reqadd rules also support ACLs. All req* rules are converted
now.

15 years ago[DOC] add some build info about the AIX platform
Willy Tarreau [Thu, 28 Jan 2010 19:52:05 +0000 (20:52 +0100)] 
[DOC] add some build info about the AIX platform
(cherry picked from commit e41914c77edbc40aebf827b37542d37d758e371e)

15 years ago[MEDIUM] http: add support for conditional request filter execution
Willy Tarreau [Thu, 28 Jan 2010 19:35:13 +0000 (20:35 +0100)] 
[MEDIUM] http: add support for conditional request filter execution

All the req* rules except the reqadd rules can now be specified with
an if/unless condition. If a condition is specified and does not match,
the filter is ignored. This is particularly useful with reqidel, reqirep
and reqtarpit.

15 years ago[MEDIUM] http: make the request filter loop check for optional conditions
Willy Tarreau [Thu, 28 Jan 2010 19:22:06 +0000 (20:22 +0100)] 
[MEDIUM] http: make the request filter loop check for optional conditions

From now on, if request filters have ACLs defined, these ACLs will be
evaluated to condition the filter. This will be used to conditionally
remove/rewrite headers based on ACLs.

15 years ago[MEDIUM] config: factor out the parsing of 20 req*/rsp* keywords
Willy Tarreau [Thu, 28 Jan 2010 18:33:49 +0000 (19:33 +0100)] 
[MEDIUM] config: factor out the parsing of 20 req*/rsp* keywords

A new function was added to take care of the common code between
all those keywords. This has saved 8 kB of object code and about
500 lines of source code. This has also permitted to spot and fix
minor bugs (allocated args that were never used).

The code could be factored even more but that would make it a bit
more complex which is not interesting at this stage.

Various tests have been performed, and the warnings and errors are
still correctly reported and everything seems to work as expected.

15 years ago[CLEANUP] config: specify correct const char types to warnif_* functions
Willy Tarreau [Thu, 28 Jan 2010 18:01:34 +0000 (19:01 +0100)] 
[CLEANUP] config: specify correct const char types to warnif_* functions

Also factor out a few declarations of acl_cond everywhere.

15 years ago[MINOR] prepare req_*/rsp_* to receive a condition
Willy Tarreau [Thu, 28 Jan 2010 17:10:50 +0000 (18:10 +0100)] 
[MINOR] prepare req_*/rsp_* to receive a condition

It will be very handy to be able to pass conditions to req_* and rsp_*.
For now, we just add the pointer to the condition in the affected
structs.

15 years ago[CLEANUP] config: use warnif_cond_requires_resp() to check for bad ACLs
Willy Tarreau [Thu, 28 Jan 2010 16:59:39 +0000 (17:59 +0100)] 
[CLEANUP] config: use warnif_cond_requires_resp() to check for bad ACLs

Factor out some repetitive copy-pasted code to check for request ACLs
validity.

15 years ago[CLEANUP] config: use build_acl_cond() instead of parse_acl_cond()
Willy Tarreau [Thu, 28 Jan 2010 16:12:36 +0000 (17:12 +0100)] 
[CLEANUP] config: use build_acl_cond() instead of parse_acl_cond()

This allows to clean up the code a little bit by moving some of the
ACL internals out of the config parser.

15 years ago[MINOR] acl: add build_acl_cond() to make it easier to add ACLs in config
Willy Tarreau [Thu, 28 Jan 2010 15:48:33 +0000 (16:48 +0100)] 
[MINOR] acl: add build_acl_cond() to make it easier to add ACLs in config

This function automatically builds a rule, considering the if/unless
statements, and automatically updates the proxy's acl_requires, the
condition's file and line.

15 years ago[MINOR] http: disable keep-alive when process is going down
Willy Tarreau [Thu, 28 Jan 2010 14:01:20 +0000 (15:01 +0100)] 
[MINOR] http: disable keep-alive when process is going down

Krzysztof Oledzki suggested to disable keep-alive when a process
is going down due to a reload, in order to avoid ever-lasting
sessions. This is a simple and very efficient solution as it
ensures that at most one more request will be handled on a
keep-alive connection after the process has received a SIGUSR1
signal.

15 years ago[BUG] halog: fix segfault in case of empty log in PCT mode
Willy Tarreau [Tue, 17 Nov 2009 09:16:19 +0000 (10:16 +0100)] 
[BUG] halog: fix segfault in case of empty log in PCT mode
(cherry picked from commit fe362fe4762151d209b9656639ee1651bc2b329d)

15 years ago[BUILD] halog: make without arch-specific optimizations
Willy Tarreau [Tue, 17 Nov 2009 09:08:17 +0000 (10:08 +0100)] 
[BUILD] halog: make without arch-specific optimizations

15 years ago[MINOR] checks: add the server's status in the checks
Willy Tarreau [Wed, 27 Jan 2010 10:53:01 +0000 (11:53 +0100)] 
[MINOR] checks: add the server's status in the checks

Now a server can check the contents of the header X-Haproxy-Server-State
to know how haproxy sees it. The same values as those reported in the stats
are provided :
  - up/down status + check counts
  - throttle
  - weight vs backend weight
  - active sessions vs backend sessions
  - queue length
  - haproxy node name

15 years ago[MINOR] checks: make the HTTP check code add the CRLF itself
Willy Tarreau [Wed, 27 Jan 2010 10:28:42 +0000 (11:28 +0100)] 
[MINOR] checks: make the HTTP check code add the CRLF itself

Currently we cannot easily add headers nor anything to HTTP checks
because the requests are pre-formatted with the last CRLF. Make the
check code add the CRLF itself so that we can later add useful info.

15 years ago[BUG] restore accidentely removed line in last patch !
Willy Tarreau [Wed, 27 Jan 2010 19:13:38 +0000 (20:13 +0100)] 
[BUG] restore accidentely removed line in last patch !

The test condition for the acl expression validity got dropped, and
only the error remained. Error reported by Krzysztof Oledzki.

15 years ago[CLEANUP] acl, patterns: make use of my_strndup() instead of malloc+memcpy
Willy Tarreau [Tue, 26 Jan 2010 18:02:46 +0000 (19:02 +0100)] 
[CLEANUP] acl, patterns: make use of my_strndup() instead of malloc+memcpy

This is simpler and more readable.

15 years ago[MINOR] config: off-by-one in "stick-table" after list of converters
Willy Tarreau [Tue, 26 Jan 2010 17:36:26 +0000 (18:36 +0100)] 
[MINOR] config: off-by-one in "stick-table" after list of converters

15 years ago[MINOR] pattern: add the "ipmask()" converting function
Willy Tarreau [Tue, 26 Jan 2010 17:01:41 +0000 (18:01 +0100)] 
[MINOR] pattern: add the "ipmask()" converting function

This converter can be applied on top of an IPv4-type pattern. It
applies a netmask which is suited for IP address storage and matching.
This can be used to make all hosts within a certain mask to share the
same table entries and as such use the same server.

The mask can be passed in dotted form (eg: 255.255.255.0) or in CIDR
form (eg: 24).

15 years ago[MINOR] pattern: add support for argument parsers for converters
Willy Tarreau [Tue, 26 Jan 2010 16:58:06 +0000 (17:58 +0100)] 
[MINOR] pattern: add support for argument parsers for converters

Some converters will need one or several arguments. It's not possible
to write a simple generic parser for that, so let's add the ability
for each converter to support its own argument parser, and call it
to get the arguments when it's specified. If unspecified, the arguments
are passed unmodified as string+len.

15 years ago[MINOR] standard: str2mask: string to netmask converter
Willy Tarreau [Tue, 26 Jan 2010 16:36:17 +0000 (17:36 +0100)] 
[MINOR] standard: str2mask: string to netmask converter

This function converts a dotted or CIDR value to a netmask.

15 years ago[MINOR] pattern: make the converter more flexible by supporting void* and int args
Willy Tarreau [Tue, 26 Jan 2010 16:17:56 +0000 (17:17 +0100)] 
[MINOR] pattern: make the converter more flexible by supporting void* and int args

The pattern type converters currently support a string arg and a length.
Sometimes we'll prefer to pass them a list or a structure. So let's convert
the string and length into a generic void* and int that each converter may
use as it likes.

15 years ago[BUG] patterns: copy-paste typo in type conversion arguments
Willy Tarreau [Tue, 26 Jan 2010 15:48:20 +0000 (16:48 +0100)] 
[BUG] patterns: copy-paste typo in type conversion arguments

15 years ago[STATS] make it possible to change a CLI connection timeout
Willy Tarreau [Tue, 26 Jan 2010 09:59:06 +0000 (10:59 +0100)] 
[STATS] make it possible to change a CLI connection timeout

Sometimes it helps to be able to change an interactive CLI connection
timeout. Now we just have to enter "set timeout cli <value>" to do that.

15 years ago[RELEASE] Released version 1.4-dev8 v1.4-dev8
Willy Tarreau [Mon, 25 Jan 2010 22:28:05 +0000 (23:28 +0100)] 
[RELEASE] Released version 1.4-dev8

Released version 1.4-dev8 with the following main changes :
    - [CLEANUP] Keep in sync "defaults" support between documentation and code
    - [MEDIUM] http: add support for Proxy-Connection header
    - [CRITICAL] buffers: buffer_insert_line2 must not change the ->w entry
    - [MINOR] http: remove a copy-paste typo in transaction cleaning
    - [BUG] http: trim any excess buffer data when recycling a connection

15 years ago[CLEANUP] Keep in sync "defaults" support between documentation and code
Cyril Bonté [Sun, 24 Jan 2010 22:29:44 +0000 (23:29 +0100)] 
[CLEANUP] Keep in sync "defaults" support between documentation and code

Hi Willy,

I've made a quick pass on the "defaults" column in the Proxy keywords matrix (chapter 4.1. in the documentation).
This patch resyncs the code and the documentation. I let you decide if some keywords that still work in the "defaults" section should be forbidden.

- default_backend : in the matrix, "defaults" was not supported but the keyword details say it is.
Tests also shows it works, then I've updated the matrix.

- capture cookie : in the keyword details, we can read `It is not possible to specify a capture in a "defaults" section.'.
Ok, even if the tests worked, I've added an alert in the configuration parser (as it is for capture request/response header).

- description : not supported in "defaults", I added an alert in the parser.
I've also noticed that this keyword doesn't appear in the documentation.
There's one "description" entry, but for the "global" section, which is for a different use (the patch doesn't update the documentation).

- grace : even if this is maybe useless, it works in "defaults". Documentation is updated.
- redirect : alert is added in the parser.
- rsprep : alert added in the parser.

--
Cyril Bonté

15 years ago[BUG] http: trim any excess buffer data when recycling a connection
Willy Tarreau [Mon, 25 Jan 2010 22:11:14 +0000 (23:11 +0100)] 
[BUG] http: trim any excess buffer data when recycling a connection

We must trim any excess data from the response buffer when recycling
a keep-alive connection, because we may have blocked an invalid response
from a server that we don't want to accidentely forward once we disable
the analysers, nor do we want those data to come along with next response.
A typical example of such data would be from a buggy server responding to
a HEAD with some data, or sending more than the advertised content-length.

15 years ago[MINOR] http: remove a copy-paste typo in transaction cleaning
Willy Tarreau [Mon, 25 Jan 2010 21:46:30 +0000 (22:46 +0100)] 
[MINOR] http: remove a copy-paste typo in transaction cleaning

For deciding to set the BF_EXPECT_MORE, we reused the same code as in
http_wait_for_request(), but here we must ignore buf->lr which is not
yet set and useless. This might only have caused random sub-optimal
behaviours.

15 years ago[CRITICAL] buffers: buffer_insert_line2 must not change the ->w entry
Willy Tarreau [Mon, 25 Jan 2010 19:39:51 +0000 (20:39 +0100)] 
[CRITICAL] buffers: buffer_insert_line2 must not change the ->w entry

Krzysztof Oledzki reported that 1.4-dev7 would regularly crash
on an apparently very common workload. The cores he provided
showed some inter-buffer data corruption, exactly similar to
what was fixed by the following recent commit :

bbfa7938bd74adbfa435f26503fc10f5938195a3 [BUG] buffer_replace2 must never change the ->w entry

In fact, it was buffer_insert_line2() which was still modifying the
->w pointer, causing issues with pipelined responses in keep-alive
mode if some headers were to be added.

The bug requires a remote client, a near server, large server buffers
and small client buffers to be reproduced, with response header
insertion. Still, it's surprizing that it did not trigger earlier.

Now after 100k pipelined requests it did not trigger anymore.

15 years ago[MEDIUM] http: add support for Proxy-Connection header
Willy Tarreau [Mon, 25 Jan 2010 11:15:43 +0000 (12:15 +0100)] 
[MEDIUM] http: add support for Proxy-Connection header

Despite what is explicitly stated in HTTP specifications,
browsers still use the undocumented Proxy-Connection header
instead of the Connection header when they connect through
a proxy. As such, proxies generally implement support for
this stupid header name, breaking the standards and making
it harder to support keep-alive between clients and proxies.

Thus, we add a new "option http-use-proxy-header" to tell
haproxy that if it sees requests which look like proxy
requests, it should use the Proxy-Connection header instead
of the Connection header.

15 years ago[RELEASE] Released version 1.4-dev7 v1.4-dev7
Willy Tarreau [Mon, 25 Jan 2010 00:54:37 +0000 (01:54 +0100)] 
[RELEASE] Released version 1.4-dev7

Released version 1.4-dev7 with the following main changes :
    - [BUG] appsession: possible memory leak in case of out of memory condition
    - [MINOR] config: don't accept 'appsession' in defaults section
    - [MINOR] Add function to parse a size in configuration
    - [MEDIUM] Add stick table (persistence) management functions and types
    - [MEDIUM] Add pattern fetch management types and functions
    - [MEDIUM] Add src dst and dport pattern fetches.
    - [MEDIUM] Add stick table configuration and init.
    - [MEDIUM] Add stick and store rules analysers.
    - [MINOR] add option "mysql-check" to use MySQL health checks
    - [BUG] health checks: fix requeued message
    - [OPTIM] remove SSP_O_VIA and SSP_O_STATUS
    - [BUG] checks: fix newline termination
    - [MINOR] acl: add fe_id/so_id to match frontend's and socket's id
    - [BUG] appsession's sessid must be reset at end of transaction
    - [BUILD] appsession did not build anymore under gcc-2.95
    - [BUG] server redirection used an uninitialized string.
    - [MEDIUM] http: fix handling of message pointers
    - [MINOR] http: fix double slash prefix with server redirect
    - [MINOR] http redirect: add the ability to append a '/' to the URL
    - [BUG] stream_interface: fix retnclose and remove cond_close
    - [MINOR] http redirect: don't explicitly state keep-alive on 1.1
    - [MINOR] http: move appsession 'sessid' from session to http_txn
    - [OPTIM] reorder http_txn to optimize cache lines placement
    - [MINOR] http: differentiate waiting for new request and waiting for a complete requst
    - [MINOR] http: add a separate "http-keep-alive" timeout
    - [MINOR] config: remove undocumented and buggy 'timeout appsession'
    - [DOC] fix various too large lines
    - [DOC] remove several trailing spaces
    - [DOC] add the doc about stickiness
    - [BUILD] remove a warning in standard.h on AIX
    - [BUG] checks: chars are unsigned on AIX, check was always true
    - [CLEANUP] stream_sock: MSG_NOSIGNAL is only for send(), not recv()
    - [BUG] check: we must not check for error before reading a response
    - [BUG] buffers: remove remains of wrong obsolete length check
    - [OPTIM] stream_sock: don't shutdown(write) when the socket is in error
    - [BUG] http: don't count req errors on client resets or t/o during keep-alive
    - [MEDIUM] http: don't switch to tunnel mode upon close
    - [DOC] add documentation about connection header processing
    - [MINOR] http: add http_remove_header2() to remove a header value.
    - [MINOR] tools: add a "word_match()" function to match words and ignore spaces
    - [MAJOR] http: rework request Connection header handling
    - [MAJOR] http: rework response Connection header handling
    - [MINOR] add the ability to force kernel socket buffer size.
    - [BUG] http_server_error() must not purge a previous pending response
    - [OPTIM] http: don't delay response if next request is incomplete
    - [MINOR] add the "force-persist" statement to force persistence on down servers
    - [MINOR] http: logs must report persistent connections to down servers
    - [BUG] buffer_replace2 must never change the ->w entry

15 years ago[BUG] buffer_replace2 must never change the ->w entry
Willy Tarreau [Mon, 25 Jan 2010 00:49:57 +0000 (01:49 +0100)] 
[BUG] buffer_replace2 must never change the ->w entry

This function is used to move data which is located between ->w and ->r,
so it must not touch ->w, otherwise it will displace pending data which
is before the one we're actually overwriting. The issue arises with
some pipelined responses which cause some part of the previous one to
be chopped off when removing the connection: close header, thus
corrupting last response and shifting next one. Those are detected
in the logs because the next response will be a 502 with flags PH.

15 years ago[MINOR] http: logs must report persistent connections to down servers
Willy Tarreau [Sun, 24 Jan 2010 12:10:43 +0000 (13:10 +0100)] 
[MINOR] http: logs must report persistent connections to down servers

When using "option persist" or "force-persist", we want to know from the
logs if the cookie referenced a valid server or a down server. Till here
the flag reported a valid server even if the server was down, which is
misleading. Now we correctly report that the requested server was down.
We can typically see "--DI" when using "option persist" with redispatch,
ad "SCDN" when using force-persist on a down server.

15 years ago[MINOR] add the "force-persist" statement to force persistence on down servers
Willy Tarreau [Fri, 22 Jan 2010 18:10:05 +0000 (19:10 +0100)] 
[MINOR] add the "force-persist" statement to force persistence on down servers

This is used to force access to down servers for some requests. This
is useful when validating that a change on a server correctly works
before enabling the server again.

15 years ago[OPTIM] http: don't delay response if next request is incomplete
Willy Tarreau [Fri, 22 Jan 2010 13:41:29 +0000 (14:41 +0100)] 
[OPTIM] http: don't delay response if next request is incomplete

We use to delay the response if there is a new request in the buffer.
However, if the pending request is incomplete, we should not delay the
pending responses.

15 years ago[BUG] http_server_error() must not purge a previous pending response
Willy Tarreau [Fri, 22 Jan 2010 13:17:47 +0000 (14:17 +0100)] 
[BUG] http_server_error() must not purge a previous pending response

This can cause parts of responses to be truncated in case of
pipelined requests if the second request generates an error
before the first request is completely flushed.

15 years ago[MINOR] add the ability to force kernel socket buffer size.
Willy Tarreau [Thu, 21 Jan 2010 16:43:04 +0000 (17:43 +0100)] 
[MINOR] add the ability to force kernel socket buffer size.

Sometimes we need to be able to change the default kernel socket
buffer size (recv and send). Four new global settings have been
added for this :
   - tune.rcvbuf.client
   - tune.rcvbuf.server
   - tune.sndbuf.client
   - tune.sndbuf.server

Those can be used to reduce kernel memory footprint with large numbers
of concurrent connections, and to reduce risks of write timeouts with
very slow clients due to excessive kernel buffering.

15 years ago[MAJOR] http: rework response Connection header handling
Willy Tarreau [Mon, 18 Jan 2010 18:08:45 +0000 (19:08 +0100)] 
[MAJOR] http: rework response Connection header handling

This one is the next step of previous patch. It correctly computes
the response mode and the Connection flag transformations depending
on the request mode and version, and the response version and headers.

We're now also able to add "Connection: keep-alive", and to convert
server's close during a keep-alive connection to a server-close
connection.