Commit Graph

324 Commits

Author SHA1 Message Date
Willy Tarreau
bd741540d2 [MEDIUM] checks: add support for HTTP contents lookup
This patch adds the "http-check expect [r]{string,status}" statements
which enable health checks based on whether the response status or body
to an HTTP request contains a string or matches a regex.

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

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

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

(cherry picked from commit b507c43a3ce9a8e8e4b770e52e4edc20cba4c37f)
2010-10-30 19:04:31 +02:00
Gabor Lekeny
b4c81e4c81 [MINOR] checks: add support for LDAPv3 health checks
This patch provides a new "option ldap-check" statement to enable
server health checks based on LDAPv3 bind requests.
(cherry picked from commit b76b44c6fed8a7ba6f0f565dd72a9cb77aaeca7c)
2010-10-30 19:04:31 +02:00
Willy Tarreau
b824b002cd [MEDIUM] tcp-request : don't wait for inspect-delay to expire when the buffer is full
If a request buffer is full, there's no point waiting for the timeout to
expire, the contents will not change.
2010-10-30 19:04:31 +02:00
Willy Tarreau
22a9534213 [MEDIUM] make it possible to combine http-pretend-keepalived with httpclose
Some configs may involve httpclose in a frontend and http-pretend-keepalive
in a backend. httpclose used to take priority over keepalive, thus voiding
its effect. This change ensures that when both are combined, keepalive is
still announced to the server while close is announced to the client.
(cherry picked from commit 2be7ec90fa9caf66294f446423bbab2d00db9004)
2010-10-30 19:04:31 +02:00
Willy Tarreau
a56235c5d3 [DOC] tcp-request inspect-delay is for backends too 2010-10-30 19:04:30 +02:00
Willy Tarreau
7ab6aff926 [DOC] missing index entry for http-check send-state 2010-10-12 06:30:16 +02:00
Willy Tarreau
59f8920ea5 [DOC] bind option is "defer-accept", not "defer_accept"
Thanks to Yohan Tordjman for spotting this.
2010-10-02 11:55:25 +02:00
Willy Tarreau
6cbd64773b [DOC] fix typo in the avg_queue() and be_conn() definition (backend, not frontend)
Reported by Cyril Bonté
2010-09-08 19:06:18 +02:00
Willy Tarreau
f5a526f39f [DOC] fix typo in the queue() definition (backend, not frontend)
Reported by Benjamin Pineau.
2010-09-01 08:06:18 +02:00
Willy Tarreau
a79094d3e4 [DOC] fix description of cookie "insert" and "indirect" modes
The doc was wrong as the insert mode by default does not insert in
direct requests, and by default transmits the cookies to the server.
This was right in the old doc and it has not changed since the
beginning.
2010-08-31 23:58:21 +02:00
Willy Tarreau
a168b10a71 [DOC] add a summary about cookie incompatibilities between specs and browsers
As many implementations as browsers, none following at least one of the 4
specs.
2010-08-31 23:58:03 +02:00
Willy Tarreau
37242fa7ce [RELEASE] Released version 1.5-dev2
Released version 1.5-dev2 with the following main changes :
    - [MINOR] startup: release unused structs after forking
    - [MINOR] startup: don't wait for nothing when no old pid remains
    - [CLEANUP] reference product branch 1.5
    - [MEDIUM] signals: add support for registering functions and tasks
    - [MEDIUM] signals: support redistribution of signal zero when stopping
    - [BUG] http: don't set auto_close if more data are expected
2010-08-28 19:21:00 +02:00
Willy Tarreau
fc815fddd8 [RELEASE] Released version 1.5-dev1
Released version 1.5-dev1 with the following main changes :
    - [BUG] stats: session rate limit gets garbaged in the stats
    - [DOC] mention 'option http-server-close' effect in Tq section
    - [DOC] summarize and highlight persistent connections behaviour
    - [DOC] add configuration samples
    - [BUG] http: dispatch and http_proxy modes were broken for a long time
    - [BUG] http: the transaction must be initialized even in TCP mode
    - [BUG] tcp: dropped connections must be counted as "denied" not "failed"
    - [BUG] consistent hash: balance on all servers, not only 2 !
    - [CONTRIB] halog: report per-server status codes, errors and response times
    - [BUG] http: the transaction must be initialized even in TCP mode (part 2)
    - [BUG] client: always ensure to zero rep->analysers
    - [BUG] session: clear BF_READ_ATTACHED before next I/O
    - [BUG] http: automatically close response if req is aborted
    - [BUG] proxy: connection rate limiting was eating lots of CPU
    - [BUG] http: report correct flags in case of client aborts during body
    - [TESTS] refine non-regression tests and add 4 new tests
    - [BUG] debug: wrong pointer was used to report a status line
    - [BUG] debug: correctly report truncated messages
    - [DOC] document the "dispatch" keyword
    - [BUG] stick_table: fix possible memory leak in case of connection error
    - [CLEANUP] acl: use 'L6' instead of 'L4' in ACL flags relying on contents
    - [MINOR] accept: count the incoming connection earlier
    - [CLEANUP] tcp: move some non tcp-specific layer6 processing out of proto_tcp
    - [CLEANUP] client: move some ACLs away to their respective locations
    - [CLEANUP] rename client -> frontend
    - [MEDIUM] separate protocol-level accept() from the frontend's
    - [MINOR] proxy: add a list to hold future layer 4 rules
    - [MEDIUM] config: parse tcp layer4 rules (tcp-request accept/reject)
    - [MEDIUM] tcp: check for pure layer4 rules immediately after accept()
    - [OPTIM] frontend: tell the compiler that errors are unlikely to occur
    - [MEDIUM] frontend: check for LI_O_TCP_RULES in the listener
    - [MINOR] frontend: only check for monitor-net rules if LI_O_CHK_MONNET is set
    - [CLEANUP] buffer->cto is not used anymore
    - [MEDIUM] session: finish session establishment sequence in with I/O handlers
    - [MEDIUM] session: initialize server-side timeouts after connect()
    - [MEDIUM] backend: initialize the server stream_interface upon connect()
    - [MAJOR] frontend: don't initialize the server-side stream_int anymore
    - [MEDIUM] session: move the conn_retries attribute to the stream interface
    - [MEDIUM] session: don't assign conn_retries upon accept() anymore
    - [MINOR] frontend: rely on the frontend and not the backend for INDEPSTR
    - [MAJOR] frontend: reorder the session initialization upon accept
    - [MINOR] proxy: add an accept() callback for the application layer
    - [MAJOR] frontend: split accept() into frontend_accept() and session_accept()
    - [MEDIUM] stats: rely on the standard session_accept() function
    - [MINOR] buffer: refine the flags that may wake an analyser up.
    - [MINOR] stream_sock: don't dereference a non-existing frontend
    - [MINOR] session: differenciate between accepted connections and received connections
    - [MEDIUM] frontend: count the incoming connection earlier
    - [MINOR] frontend: count denied TCP requests separately
    - [CLEANUP] stick_table: add/clarify some comments
    - [BUILD] memory: add a few missing parenthesis to the pool management macros
    - [MINOR] stick_table: add support for variable-sized data
    - [CLEANUP] stick_table: rename some stksess struct members to avoid confusion
    - [CLEANUP] stick_table: move pattern to key functions to stick_table.c
    - [MEDIUM] stick_table: add room for extra data types
    - [MINOR] stick_table: add support for "conn_cum" data type.
    - [MEDIUM] stick_table: don't overwrite data when storing an entry
    - [MINOR] config: initialize stick tables after all the parsing
    - [MINOR] stick_table: provide functions to return stksess data from a type
    - [MEDIUM] stick_table: move the server ID to a generic data type
    - [MINOR] stick_table: enable it for frontends too
    - [MINOR] stick_table: export the stick_table_key
    - [MINOR] tcp: add per-source connection rate limiting
    - [MEDIUM] stick_table: separate storage and update of session entries
    - [MEDIUM] stick-tables: add a reference counter to each entry
    - [MINOR] session: add a pointer to the tracked counters for the source
    - [CLEANUP] proto_tcp: make the config parser a little bit more flexible
    - [BUG] config: report the correct proxy type in tcp-request errors
    - [MINOR] config: provide a function to quote args in a more friendly way
    - [BUG] stick_table: the fix for the memory leak caused a regression
    - [MEDIUM] backend: support servers on 0.0.0.0
    - [BUG] stick-table: correctly refresh expiration timers
    - [MEDIUM] stream-interface: add a ->release callback
    - [MINOR] proxy: add a "parent" member to the structure
    - [MEDIUM] session: make it possible to call an I/O handler on both SI
    - [MINOR] tools: add a fast div64_32 function
    - [MINOR] freq_ctr: add new types and functions for periods different from 1s
    - [MINOR] errors: provide new status codes for config parsing functions
    - [BUG] http: denied requests must not be counted as denied resps in listeners
    - [MINOR] tools: add a get_std_op() function to parse operators
    - [MEDIUM] acl: make use of get_std_op() to parse intger ranges
    - [MAJOR] stream_sock: better wakeup conditions on read()
    - [BUG] session: analysers must be checked when SI state changes
    - [MINOR] http: reset analysers to listener's, not frontend's
    - [MEDIUM] session: support "tcp-request content" rules in backends
    - [BUILD] always match official tags when doing git-tar
    - [MAJOR] stream_interface: fix the wakeup conditions for embedded iohandlers
    - [MEDIUM] buffer: make buffer_feed* support writing non-contiguous chunks
    - [MINOR] tcp: src_count acl does not have a permanent result
    - [MAJOR] session: add track-counters to track counters related to the session
    - [MINOR] stick-table: provide a table lookup function
    - [MINOR] stick-table: use suffix "_cnt" for cumulated counts
    - [MEDIUM] session: move counter ACL fetches from proto_tcp
    - [MEDIUM] session: add concurrent connections counter
    - [MEDIUM] session: add data in and out volume counters
    - [MINOR] session: add the trk_conn_cnt ACL keyword to track connection counts
    - [MEDIUM] session-counters: automatically update tracked connection count
    - [MINOR] session: add the trk_conn_cur ACL keyword to track concurrent connection
    - [MINOR] session: add trk_kbytes_* ACL keywords to track data size
    - [MEDIUM] session: add a counter on the cumulated number of sessions
    - [MINOR] config: support a comma-separated list of store data types in stick-table
    - [MEDIUM] stick-tables: add support for arguments to data_types
    - [MEDIUM] stick-tables: add stored data argument type checking
    - [MEDIUM] session counters: add conn_rate and sess_rate counters
    - [MEDIUM] session counters: add bytes_in_rate and bytes_out_rate counters
    - [MINOR] stktable: add a stktable_update_key() function
    - [MINOR] session-counters: add a general purpose counter (gpc0)
    - [MEDIUM] session-counters: add HTTP req/err tracking
    - [MEDIUM] stats: add "show table [<name>]" to dump a stick-table
    - [MEDIUM] stats: add "clear table <name> key <value>" to clear table entries
    - [CLEANUP] stick-table: declare stktable_data_types as extern
    - [MEDIUM] stick-table: make use of generic types for stored data
    - [MINOR] stats: correctly report errors on "show table" and "clear table"
    - [MEDIUM] stats: add the ability to dump table entries matching criteria
    - [DOC] configuration: document all the new tracked counters
    - [DOC] stats: document "show table" and "clear table"
    - [MAJOR] session-counters: split FE and BE track counters
    - [MEDIUM] tcp: accept the "track-counters" in "tcp-request content" rules
    - [MEDIUM] session counters: automatically remove expired entries.
    - [MEDIUM] config: replace 'tcp-request <action>' with "tcp-request connection"
    - [MEDIUM] session-counters: make it possible to count connections from frontend
    - [MINOR] session-counters: use "track-sc{1,2}" instead of "track-{fe,be}-counters"
    - [MEDIUM] session-counters: correctly unbind the counters tracked by the backend
    - [CLEANUP] stats: use stksess_kill() to remove table entries
    - [DOC] update the references to session counters and to tcp-request connection
    - [DOC] cleanup: split a few long lines
    - [MEDIUM] http: forward client's close when abortonclose is set
    - [BUG] queue: don't dequeue proxy-global requests on disabled servers
    - [BUG] stats: global stats timeout may be specified before stats socket.
    - [BUG] conf: add tcp-request content rules to the correct list
2010-08-25 10:56:53 +02:00
Willy Tarreau
62a36c4288 [DOC] cleanup: split a few long lines 2010-08-17 16:38:36 +02:00
Willy Tarreau
e965652f23 [DOC] update the references to session counters and to tcp-request connection
The syntax has changed several times during the development, so let's reflect
that in the doc. It is now better factored.
2010-08-17 16:38:36 +02:00
Willy Tarreau
68c03aba9e [MEDIUM] config: replace 'tcp-request <action>' with "tcp-request connection"
It began to be problematic to have "tcp-request" followed by an
immediate action, as sometimes it was a keyword indicating a hook
or setting ("content" or "inspect-delay") and sometimes it was an
action.

Now the prefix for connection-level tcp-requests is "tcp-request connection"
and the ones processing contents remain "tcp-request contents".

This has allowed a nice simplification of the config parser and to
clean up the doc a bit. Also now it's a bit more clear why tcp-request
connection are not allowed in backends.
2010-08-10 18:04:15 +02:00
Willy Tarreau
88bc4ecb82 [DOC] stats: document "show table" and "clear table" 2010-08-10 18:04:15 +02:00
Willy Tarreau
c9705a15f4 [DOC] configuration: document all the new tracked counters
The following statements and ACLs have been added to the doc :

  - tcp-request track-counters <key> [table <table>] [{if | unless} <condition>]
  - src_*
  - trk_*
2010-08-10 18:04:14 +02:00
Willy Tarreau
8fb12c4b61 [MINOR] stick-table: use suffix "_cnt" for cumulated counts
The "_cnt" suffix is already used by ACLs to count various data,
so it makes sense to use the same one in "conn_cnt" instead of
"conn_cum" to count cumulated connections.

This is not a problem because no version was emitted with those
keywords.

Thus we'll try to stick to the following rules :

  xxxx_cnt : cumulated event count for criterion xxxx
  xxxx_cur : current number of concurrent entries for criterion xxxx
  xxxx_rate: event rate for criterion xxxx
2010-08-10 18:04:12 +02:00
Willy Tarreau
fb35620e87 [MEDIUM] session: support "tcp-request content" rules in backends
Sometimes it's necessary to be able to perform some "layer 6" analysis
in the backend. TCP request rules were not available till now, although
documented in the diagram. Enable them in backend now.
2010-08-10 14:10:58 +02:00
Willy Tarreau
d669a4f72b [MEDIUM] backend: support servers on 0.0.0.0
Till now when a server was configured with address 0.0.0.0, the
connection was forwarded to this address which generally is intercepted
by the system as a local address, so this was completely useless.

One sometimes useful feature for outgoing transparent proxies is to
be able to forward the connection to the same address the client
requested. This patch fixes the meaning of 0.0.0.0 precisely to
ensure that the connection will be forwarded to the initial client's
destination address.
2010-07-13 14:57:52 +02:00
Patrick Mezard
35da19ca70 [DOC] add configuration samples
configuration.txt is thorough and accurate but lacked sample configurations
clarifying both the syntax and the relations between global, defaults,
frontend, backend and listen sections. Besides, almost all examples to be found
in haproxy-en.txt or online tutorials make use of the 'listen' syntax while
'frontend/backend' is really the one to know about.
(cherry picked from commit 01ac10ad189b11c563eeb835733fba58e6c5271d)
2010-06-18 10:03:03 +02:00
Patrick Mezard
9ec2ec4085 [DOC] summarize and highlight persistent connections behaviour
(cherry picked from commit 3b5911a2d7cc61bc586259e12b3f38fd39d3a478)
2010-06-18 10:02:59 +02:00
Patrick Mezard
105facad12 [DOC] mention 'option http-server-close' effect in Tq section
(cherry picked from commit 988d65706ca5dc20e4a517d9bbc47d797945a611)
2010-06-18 10:02:55 +02:00
Willy Tarreau
a975b8f381 [MINOR] tcp: add per-source connection rate limiting
This change makes use of the stick-tables to keep track of any source
address activity. Two ACLs make it possible to check the count of an
entry or update it and act accordingly. The typical usage will be to
reject a TCP request upon match of an excess value.
2010-06-14 15:10:25 +02:00
Willy Tarreau
c00cdc2eb0 [MINOR] stick_table: enable it for frontends too
A frontend may very well host a stick-table. In fact it will be useful
with connection throttling.
2010-06-14 15:10:25 +02:00
Willy Tarreau
13c29dee21 [MEDIUM] stick_table: move the server ID to a generic data type
The server ID is now stored just as any other data type. It is only
allocated if needed and is manipulated just like the other ones.
2010-06-14 15:10:25 +02:00
Willy Tarreau
69b870f862 [MINOR] stick_table: add support for "conn_cum" data type.
This one can be parsed on the "stick-table" after with the "store"
keyword. It will hold the number of connections matching the entry,
for use with ACLs or anything else.
2010-06-14 15:10:24 +02:00
Willy Tarreau
08d5f98294 [MEDIUM] stick_table: add room for extra data types
The stick_tables will now be able to store extra data for a same key.
A limited set of extra data types will be defined and for each of them
an offset in the sticky session will be assigned at startup time. All
of this information will be stored in the stick table.

The extra data types will have to be specified after the new "store"
keyword of the "stick-table" directive, which will reserve some space
for them.
2010-06-14 15:10:24 +02:00
Willy Tarreau
2799e98a36 [MINOR] frontend: count denied TCP requests separately
It's very disturbing to see the "denied req" counter increase without
any other session counter moving. In fact, we can't count a rejected
TCP connection as "denied req" as we have not yet instanciated any
session at all. Let's use a new counter for that.
2010-06-14 10:53:20 +02:00
Willy Tarreau
1a68794418 [MEDIUM] config: parse tcp layer4 rules (tcp-request accept/reject)
These rules currently only support the "accept" and "reject" actions.
They will apply on pure layer 4 and will not support any content.
2010-06-14 10:53:12 +02:00
Willy Tarreau
5ce9457d99 [DOC] document the "dispatch" keyword
This one was not documented !
2010-06-14 10:41:27 +02:00
Willy Tarreau
21475e3215 [DEV] open new 1.5 development branch
This new branch is based on 1.4.6, which 1.5-dev0 is 100% equivalent to.
The roadmap has been updated.
2010-05-23 08:55:53 +02:00
Willy Tarreau
5fdd77da56 [RELEASE] Released version 1.4.6
Released version 1.4.6 with the following main changes :
    - [BUILD] ebtree: update to v6.0.1 to remove references to dprintf()
    - [CLEANUP] acl: make use of eb_is_empty() instead of open coding the tree's emptiness test
    - [MINOR] acl: add srv_is_up() to check that a specific server is up or not
    - [DOC] add a few precisions about the use of RDP cookies
2010-05-16 22:34:28 +02:00
Willy Tarreau
61e28f2031 [DOC] add a few precisions about the use of RDP cookies
RDP cookies are not necessarily easy to implement because they require
some configuration on the servers. Add a few hints so that people know
what to check on their servers.
2010-05-16 22:31:05 +02:00
Willy Tarreau
0b1cd94c8b [MINOR] acl: add srv_is_up() to check that a specific server is up or not
This ACL was missing in complex setups where the status of a remote site
has to be considered in switching decisions. Until there, using a server's
status in an ACL required to have a dedicated backend, which is a bit heavy
when multiple servers have to be monitored.
2010-05-16 22:18:27 +02:00
Willy Tarreau
9d4d9e3144 [RELEASE] Released version 1.4.5
Released version 1.4.5 with the following main changes :
    - [DOC] report minimum kernel version for tproxy in the Makefile
    - [MINOR] add the "ignore-persist" option to conditionally ignore persistence
    - [DOC] add the "ignore-persist" option to conditionally ignore persistence
    - [DOC] fix ignore-persist/force-persist documentation
    - [BUG] cttproxy: socket fd leakage in check_cttproxy_version
    - [DOC] doc/configuration.txt: fix typos
    - [MINOR] option http-pretend-keepalive is both for FEs and BEs
    - [MINOR] fix possible crash in debug mode with invalid responses
    - [MINOR] halog: add support for statisticts on status codes
    - [OPTIM] halog: use a faster zero test in fgets()
    - [OPTIM] halog: minor speedup by using unlikely()
    - [OPTIM] halog: speed up fgets2-64 by about 10%
    - [DOC] refresh the README file and merge the CONTRIB file into it
    - [MINOR] acl: support loading values from files
    - [MEDIUM] ebtree: upgrade to version 6.0
    - [MINOR] acl trees: add flags and union members to store values in trees
    - [MEDIUM] acl: add ability to insert patterns in trees
    - [MEDIUM] acl: add tree-based lookups of exact strings
    - [MEDIUM] acl: add tree-based lookups of networks
    - [MINOR] acl: ignore empty lines and comments in pattern files
    - [MINOR] stick-tables: add support for "stick on hdr"
2010-05-13 22:17:08 +02:00
Willy Tarreau
4a568976c5 [MINOR] stick-tables: add support for "stick on hdr"
It is now possible to stick on an IP address found in a HTTP header. Right
now only the last occurrence of the header can be used, which is generally
enough for most uses. Also, the header extraction rule only knows how to
convert the header to IP. Later it will be usable as a plain string with
an implicit conversion, and the syntax will not change.
2010-05-13 22:10:02 +02:00
Willy Tarreau
58215a01af [MINOR] acl: ignore empty lines and comments in pattern files
Most often, pattern files used by ACLs will be produced by tools
which emit some comments (eg: geolocation lists). It's very annoying
to have to clean the files before using them, and it does not make
much sense to be able to support patterns we already can't input in
the config file. So this patch makes the pattern file loader skip
lines beginning with a sharp and the empty ones, and strips leading
spaces and tabs.
2010-05-13 22:10:02 +02:00
Willy Tarreau
2b5285da33 [MINOR] acl: support loading values from files
The "acl XXX -f <file>" syntax was supported but nothing was read from
the file. This is now possible. All lines are merged verbatim, even if
they contain spaces (useful for user-agents). There are shortcomings
though. The worst one is that error reporting is too approximative.
2010-05-09 23:45:24 +02:00
Patrick Mézard
2382ad6b00 [DOC] doc/configuration.txt: fix typos 2010-05-09 21:19:49 +02:00
Cyril Bonté
0d4bf0104e [DOC] fix ignore-persist/force-persist documentation
Shame on me, I didn't correctly document the "ignore-persist" statement
(convinced I used it like this in my tests, which is not the case at all...)
This fixes the doc and updates the proxy keyword matrix to add "force-persist".
2010-04-25 23:33:29 +02:00
Cyril Bonté
a8e7bbca42 [DOC] add the "ignore-persist" option to conditionally ignore persistence
Document the "ignore-persist" option.
2010-04-25 22:39:34 +02:00
Willy Tarreau
9508c1c625 [RELEASE] Released version 1.4.4
Released version 1.4.4 with the following main changes :
    - [BUG] appsession should match the whole cookie name
    - [CLEANUP] proxy: move PR_O_SSL3_CHK to options2 to release one flag
    - [MEDIUM] backend: move the transparent proxy address selection to backend
    - [MINOR] add very fast IP parsing functions
    - [MINOR] add new tproxy flags for dynamic source address binding
    - [MEDIUM] add ability to connect to a server from an IP found in a header
    - [BUILD] config: last patch breaks build without CONFIG_HAP_LINUX_TPROXY
    - [MINOR] http: make it possible to pretend keep-alive when doing close
    - [MINOR] config: report "default-server" instead of "(null)" in error messages
2010-04-07 23:12:24 +02:00
Willy Tarreau
8a8e1d99cb [MINOR] http: make it possible to pretend keep-alive when doing close
Some servers do not completely conform with RFC2616 requirements for
keep-alive when they receive a request with "Connection: close". More
specifically, they don't bother using chunked encoding, so the client
never knows whether the response is complete or not. One immediately
visible effect is that haproxy cannot maintain client connections alive.
The second issue is that truncated responses may be cached on clients
in case of network error or timeout.

Óscar Frías Barranco reported this issue on Tomcat 6.0.20, and
Patrik Nilsson with Jetty 6.1.21.

Cyril Bonté proposed this smart idea of pretending we run keep-alive
with the server and closing it at the last moment as is already done
with option forceclose. The advantage is that we only change one
emitted header but not the overall behaviour.

Since some servers such as nginx are able to close the connection
very quickly and save network packets when they're aware of the
close negociation in advance, we don't enable this behaviour by
default.

"option http-pretend-keepalive" will have to be used for that, in
conjunction with "option http-server-close".
2010-04-05 16:26:34 +02:00
Willy Tarreau
bce7088275 [MEDIUM] add ability to connect to a server from an IP found in a header
Using get_ip_from_hdr2() we can look for occurrence #X or #-X and
extract the IP it contains. This is typically designed for use with
the X-Forwarded-For header.

Using "usesrc hdr_ip(name,occ)", it becomes possible to use the IP address
found in <name>, and possibly specify occurrence number <occ>, as the
source to connect to a server. This is possible both in a server and in
a backend's source statement. This is typically used to use the source
IP previously set by a upstream proxy.
2010-03-30 10:39:43 +02:00
Willy Tarreau
75934a1cd8 [RELEASE] Released version 1.4.3
Released version 1.4.3 with the following main changes :
    - [CLEANUP] stats: remove printf format warning in stats_dump_full_sess_to_buffer()
    - [MEDIUM] session: better fix for connection to servers with closed input
    - [DOC] indicate in the doc how to bind to port ranges
    - [BUG] backend: L7 hashing must not be performed on incomplete requests
    - [TESTS] add a simple program to test connection resets
    - [MINOR] cli: "show errors" should display "backend <NONE>" when backend was not used
    - [MINOR] config: emit warnings when HTTP-only options are used in TCP mode
    - [MINOR] config: allow "slowstart 0s"
    - [BUILD] 'make tags' did not consider files ending in '.c'
    - [MINOR] checks: add the ability to disable a server in the config
2010-03-30 09:50:08 +02:00
Willy Tarreau
9683909dce [MINOR] checks: add the ability to disable a server in the config
Adding the "disabled" keyword on a server line disables it. It can
then be enabled again on the unix socket.
2010-03-29 11:50:34 +02:00
Willy Tarreau
c5011ca82e [DOC] indicate in the doc how to bind to port ranges
This part was missing from the new doc.
2010-03-22 11:53:56 +01:00
Willy Tarreau
da618cbdbc [RELEASE] Released version 1.4.2
Released version 1.4.2 with the following main changes :
    - [CLEANUP] product branch update
    - [DOC] Some more documentation cleanups
    - [BUG] clf logs segfault when capturing a non existant header
    - [OPTIM] config: only allocate check buffer when checks are enabled
    - [MEDIUM] checks: support multi-packet health check responses
    - [CLEANUP] session: remove duplicate test
    - [BUG] http: don't wait for response data to leave buffer is client has left
    - [MINOR] proto_uxst: set accept_date upon accept() to the wall clock time
    - [MINOR] stats: don't send empty lines in "show errors"
    - [MINOR] stats: make the data dump function reusable for other purposes
    - [MINOR] stats socket: add show sess <id> to dump details about a session
    - [BUG] stats: connection reset counters must be plain ascii, not HTML
    - [BUG] url_param hash may return a down server
    - [MINOR] force null-termination of hostname
    - [MEDIUM] connect to servers even when the input has already been closed
    - [BUG] don't merge anonymous ACLs !
    - [BUG] config: fix endless loop when parsing "on-error"
    - [MINOR] http: don't mark a server as failed when it returns 501/505
    - [OPTIM] checks: try to detect the end of response without polling again
    - [BUG] checks: don't report an error when recv() returns an error after data
    - [BUG] checks: don't abort when second poll returns an error
    - [MINOR] checks: make shutdown() silently fail
    - [BUG] http: fix truncated responses on chunk encoding when size divides buffer size
    - [BUG] init: unconditionally catch SIGPIPE
    - [BUG] checks: don't wait for a close to start parsing the response
2010-03-17 23:41:57 +01:00