]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
18 years ago[MAJOR] changed TV_ETERNITY to ~0 instead of 0
Willy Tarreau [Sat, 28 Apr 2007 20:40:08 +0000 (22:40 +0200)] 
[MAJOR] changed TV_ETERNITY to ~0 instead of 0

The fact that TV_ETERNITY was 0 was very awkward because it
required that comparison functions handled the special case.
Now it is ~0 and all comparisons are performed on unsigned
values, so that it is naturally greater than any other value.

A performance gain of about 2-5% has been noticed.

18 years ago[MAJOR] replaced rbtree with ul2tree.
Willy Tarreau [Sun, 29 Apr 2007 08:41:56 +0000 (10:41 +0200)] 
[MAJOR] replaced rbtree with ul2tree.

The rbtree-based wait queue consumes a lot of CPU. Use the ul2tree
instead. Lots of cleanups and code reorganizations made it possible
to reduce the task struct and simplify the code a bit.

18 years ago[MINOR] removed useless counters from ul2tree_insert()
Willy Tarreau [Sun, 29 Apr 2007 11:37:23 +0000 (13:37 +0200)] 
[MINOR] removed useless counters from ul2tree_insert()

node_right_lookup and node_right_lookup were two statistical counters.
Let's remove them as we do not need them.

18 years ago[MINOR] import ul2tree from old librt project
Willy Tarreau [Sat, 28 Apr 2007 12:00:17 +0000 (14:00 +0200)] 
[MINOR] import ul2tree from old librt project

This is an import of the old ul2tree code as well as required bitops.
All of them will have to be refreshed at one moment.

18 years ago[MINOR] added support for dual-linked lists
Willy Tarreau [Sat, 28 Apr 2007 10:42:06 +0000 (12:42 +0200)] 
[MINOR] added support for dual-linked lists

Imported dual-linked lists management macros from the old scheduler project,
and fixed a long-standing nasty bug in the DLIST_ADD() macro.

18 years ago[RELEASE] Released version 1.3.9 with the following changes : v1.3.9
Willy Tarreau [Sun, 15 Apr 2007 23:18:12 +0000 (01:18 +0200)] 
[RELEASE] Released version 1.3.9 with the following changes :

    - modularized the polling mechanisms and use function pointers instead
      of macros at many places
    - implemented support for FreeBSD's kqueue() polling mechanism
    - fixed a warning on OpenBSD : MIN/MAX redefined
    - change socket registration order at startup to accomodate kqueue.
    - several makefile cleanups to support old shells
    - fix build with limits.h once for all
    - ev_epoll: do not rely on fd_sets anymore, use changes stacks instead.
    - fdtab now holds the results of polling
    - implemented support for speculative I/O processing with epoll()
    - remove useless calls to shutdown(SHUT_RD), resulting in small speed boost
    - auto-registering of pollers at load time

18 years ago[BUILD] regparm in fd.h broke build on gcc-2.95
Willy Tarreau [Sun, 15 Apr 2007 23:33:26 +0000 (01:33 +0200)] 
[BUILD] regparm in fd.h broke build on gcc-2.95

It was necessary to put the attribute after the type.

18 years ago[MAJOR] introduced speculative I/O with epoll()
Willy Tarreau [Sun, 15 Apr 2007 22:53:59 +0000 (00:53 +0200)] 
[MAJOR] introduced speculative I/O with epoll()

The principle behind speculative I/O is to speculatively try to
perform I/O before registering the events in the system. This
considerably reduces the number of calls to epoll_ctl() and
sometimes even epoll_wait(), and manages to increase overall
performance by about 10%.

The new poller has been called "sepoll". It is used by default
on Linux when it works. A corresponding option "nosepoll" and
the command line argument "-ds" allow to disable it.

18 years ago[MAJOR] auto-registering of pollers at load time
Willy Tarreau [Sun, 15 Apr 2007 22:25:25 +0000 (00:25 +0200)] 
[MAJOR] auto-registering of pollers at load time

Gcc provides __attribute__((constructor)) which is very convenient
to execute functions at startup right before main(). All the pollers
have been converted to have their register() function declared like
this, so that it is not necessary anymore to call them from a centralized
file.

18 years ago[BUILD] declare epoll_* as static when using our own functions
Willy Tarreau [Sun, 15 Apr 2007 21:57:41 +0000 (23:57 +0200)] 
[BUILD] declare epoll_* as static when using our own functions

We will have to share this code among several implementations.

18 years ago[MAJOR] remove useless calls to shutdown(SHUT_RD)
Willy Tarreau [Sun, 15 Apr 2007 19:26:58 +0000 (21:26 +0200)] 
[MAJOR] remove useless calls to shutdown(SHUT_RD)

shutdown(SHUT_RD) is useless on data TCP sockets. It does nothing
and consumes one syscall. Remove it.

18 years ago[MAJOR] implemented support for speculative I/O processing
Willy Tarreau [Sun, 15 Apr 2007 18:56:27 +0000 (20:56 +0200)] 
[MAJOR] implemented support for speculative I/O processing

The pollers will now be able to speculatively call the I/O
processing functions and decide whether or not they want to
poll on those FDs. The changes primarily consist in teaching
those functions how to pass the info they got an EAGAIN.

18 years ago[MINOR] add support for the polling results in fdtab
Willy Tarreau [Sun, 15 Apr 2007 09:31:05 +0000 (11:31 +0200)] 
[MINOR] add support for the polling results in fdtab

Now fdtab can contain the FD_POLL_* events so that the pollers
which can fill them can give userful information to readers and
writers about the precise condition of wakeup.

18 years ago[MINOR] recompute maxfd before touching fdtab
Willy Tarreau [Sun, 15 Apr 2007 08:58:02 +0000 (10:58 +0200)] 
[MINOR] recompute maxfd before touching fdtab

It may be dangerous to play with fdtab before doing fd_insert()
because this last one is responsible for growing maxfd as needed.
Call fd_insert() before instead.

18 years ago[MINOR] copy-paste typo when checking for -dk to disable kqueue.
Willy Tarreau [Tue, 10 Apr 2007 20:45:11 +0000 (22:45 +0200)] 
[MINOR] copy-paste typo when checking for -dk to disable kqueue.

18 years ago[MAJOR] missing tv_now in kqueue_poll() blocking timeouts
Willy Tarreau [Tue, 10 Apr 2007 00:31:54 +0000 (02:31 +0200)] 
[MAJOR] missing tv_now in kqueue_poll() blocking timeouts

a missing call to tv_now(&now) just after kevent() prevented
the timeouts from expiring.

18 years ago[MAJOR] ev_epoll: do not rely on fd_sets anymore
Willy Tarreau [Mon, 9 Apr 2007 23:33:20 +0000 (01:33 +0200)] 
[MAJOR] ev_epoll: do not rely on fd_sets anymore

The new epoll-based poller uses a list of changes in order to
process only the fds which have changed.

18 years ago[BUILD] Fix limits.h once for all
Willy Tarreau [Mon, 9 Apr 2007 20:16:12 +0000 (22:16 +0200)] 
[BUILD] Fix limits.h once for all

Patch #cf83df3d162687d9c74783357421bd89f596eaac was stupid. Including
limits.h is portable and easier. At least it now builds on Solaris,
FreeBSD, Linux and OpenBSD.

18 years ago[CLEANUP] make makefile more old sh-friendly
Willy Tarreau [Mon, 9 Apr 2007 20:07:11 +0000 (22:07 +0200)] 
[CLEANUP] make makefile more old sh-friendly

Older SH on Solaris does not know about $(cmd) but only know `cmd`.

18 years ago[MINOR] kqueue: use fd_clo() to close the fd
Willy Tarreau [Mon, 9 Apr 2007 18:38:57 +0000 (20:38 +0200)] 
[MINOR] kqueue: use fd_clo() to close the fd

fd_clo() does not call kevent() which is not needed during a close().
This one will be faster.

18 years ago[MAJOR] delay registering of listener sockets at startup
Willy Tarreau [Mon, 9 Apr 2007 17:29:56 +0000 (19:29 +0200)] 
[MAJOR] delay registering of listener sockets at startup

Some pollers such as kqueue lose their FD across fork(), meaning that
the registered file descriptors are lost too. Now when the proxies are
started by start_proxies(), the file descriptors are not registered yet,
leaving enough time for the fork() to take place and to get a new pollfd.
It will be the first call to maintain_proxies that will register them.

18 years ago[MEDIUM] kqueue: do not manually remove fds
Willy Tarreau [Mon, 9 Apr 2007 15:16:07 +0000 (17:16 +0200)] 
[MEDIUM] kqueue: do not manually remove fds

FDs attached to a kevent are automatically removed after close().
Also, do not mark the FDs as EV_CLEAR. We want to stay informed
about readiness.

18 years ago[BUILD] enable kqueue on MacOS X too
Willy Tarreau [Mon, 9 Apr 2007 14:30:28 +0000 (16:30 +0200)] 
[BUILD] enable kqueue on MacOS X too

MacOS X is said to have kqueue. Let's enable it too.

18 years ago[MAJOR] kqueue bug in handling infinite timeouts
Willy Tarreau [Mon, 9 Apr 2007 14:25:46 +0000 (16:25 +0200)] 
[MAJOR] kqueue bug in handling infinite timeouts

Calls to kevent() need to pass NULL when there is no timeout.

18 years ago[MAJOR] kqueue was not initialized during startup
Willy Tarreau [Mon, 9 Apr 2007 14:11:49 +0000 (16:11 +0200)] 
[MAJOR] kqueue was not initialized during startup

18 years ago[BUILD] fixed a warning on OpenBSD : MIN/MAX redefined
Willy Tarreau [Mon, 9 Apr 2007 14:10:57 +0000 (16:10 +0200)] 
[BUILD] fixed a warning on OpenBSD : MIN/MAX redefined

18 years ago[BUILD] fix build on FreeBSD for INT_MIN/INT_MAX
Willy Tarreau [Mon, 9 Apr 2007 13:57:51 +0000 (15:57 +0200)] 
[BUILD] fix build on FreeBSD for INT_MIN/INT_MAX

FreeBSD stores INT_MIN and INT_MAX in sys/limits.h only. Other systems
(Solaris) have it in sys/types.h and do not have sys/limits.h. Let's
include sys/limits.h only if INT_MAX is not defined.

18 years ago[MINOR] use 'is_set' instead of 'isset' in struct poller
Willy Tarreau [Mon, 9 Apr 2007 13:34:49 +0000 (15:34 +0200)] 
[MINOR] use 'is_set' instead of 'isset' in struct poller

'isset' was defined as a macro in /usr/include/sys/param.h, and
it breaks build on at least OpenBSD.

18 years ago[MINOR] removed proto/polling.h which was not used anymore
Willy Tarreau [Mon, 9 Apr 2007 13:28:51 +0000 (15:28 +0200)] 
[MINOR] removed proto/polling.h which was not used anymore

18 years ago[MAJOR] implemented support for FreeBSD's kqueue() polling mechanism
Willy Tarreau [Mon, 9 Apr 2007 10:03:06 +0000 (12:03 +0200)] 
[MAJOR] implemented support for FreeBSD's kqueue() polling mechanism

It has not been tested yet, but at least it builds.

18 years ago[MINOR] ev_* : moved the poll function closer to fd_*
Willy Tarreau [Mon, 9 Apr 2007 07:23:31 +0000 (09:23 +0200)] 
[MINOR] ev_* : moved the poll function closer to fd_*

18 years ago[MINOR] changed fd_set*/fd_clr* functions to return ints
Willy Tarreau [Sun, 8 Apr 2007 22:54:46 +0000 (00:54 +0200)] 
[MINOR] changed fd_set*/fd_clr* functions to return ints

The fd_* functions now return ints so that they can be
factored when appropriate.

18 years ago[MEDIUM] pollers: store the events in arrays
Willy Tarreau [Sun, 8 Apr 2007 15:42:27 +0000 (17:42 +0200)] 
[MEDIUM] pollers: store the events in arrays

Instead of managing StaticReadEvent/StaticWriteEvent, use evts[dir]

18 years ago[MEDIUM] factor FD_ISSET/FD_CLR and !FD_ISSET/FD_SET
Willy Tarreau [Sun, 8 Apr 2007 15:17:37 +0000 (17:17 +0200)] 
[MEDIUM] factor FD_ISSET/FD_CLR and !FD_ISSET/FD_SET

Use the new FD_COND_C/FD_COND_S macros to reduce the number of
operations during tests and sets.

18 years ago[MEDIUM] updated all files to use EV_FD_*
Willy Tarreau [Sun, 8 Apr 2007 14:59:42 +0000 (16:59 +0200)] 
[MEDIUM] updated all files to use EV_FD_*

Removed the temporary dirty hack.

18 years ago[MAJOR] modularize the polling mechanisms
Willy Tarreau [Sun, 8 Apr 2007 14:39:58 +0000 (16:39 +0200)] 
[MAJOR] modularize the polling mechanisms

select, poll and epoll now have their dedicated functions and have
been split into distinct files. Several FD manipulation primitives
have been provided with each poller.

The rest of the code needs to be cleaned to remove traces of
StaticReadEvent/StaticWriteEvent. A trick involving a macro has
temporarily been used right now. Some work needs to be done to
factorize tests and sets everywhere.

18 years ago[MINOR] pollers should not use MY_FD_*
Willy Tarreau [Sun, 8 Apr 2007 07:32:47 +0000 (09:32 +0200)] 
[MINOR] pollers should not use MY_FD_*

18 years ago[RELEASE] Released version 1.3.8.2 with the following changes : v1.3.8.2
Willy Tarreau [Tue, 3 Apr 2007 18:30:13 +0000 (20:30 +0200)] 
[RELEASE] Released version 1.3.8.2 with the following changes :

    - rewriting either the status line or request line could crash the
      process due to a pointer which ought to be reset before parsing.
    - rewriting the status line in the response did not work, it caused
      a 502 Bad Gateway due to an erroneous state during parsing

18 years ago[BUG] initialize msg->sol before parsing first line
Willy Tarreau [Tue, 3 Apr 2007 18:03:18 +0000 (20:03 +0200)] 
[BUG] initialize msg->sol before parsing first line

Before calling http_parse_{sts,req}line(), it is necessary
to make msg->sol point to the beginning of the line. This
was not done, resulting in the proxy sometimes crashing when
URI rewriting or result rewriting was used.

18 years ago[BUG] Status line in HTTP response could not be rewritten
Willy Tarreau [Tue, 3 Apr 2007 12:45:44 +0000 (14:45 +0200)] 
[BUG] Status line in HTTP response could not be rewritten

Typo implied use of HTTP_MSG_RQMETH state instead of HTTP_MSG_RPVER.

18 years ago[CONTRIB] the URLs in the SPEC files were obsolete
Willy Tarreau [Sun, 1 Apr 2007 09:37:02 +0000 (11:37 +0200)] 
[CONTRIB] the URLs in the SPEC files were obsolete

18 years ago[RELEASE] Released version 1.3.8.1 with the following changes : v1.3.8.1
Willy Tarreau [Sun, 1 Apr 2007 09:06:22 +0000 (11:06 +0200)] 
[RELEASE] Released version 1.3.8.1 with the following changes :

    - fix reqadd when no option httpclose is used.
    - removed now unused fiprm and beprm from proxies
    - split logs into two versions : TCP and HTTP
    - added some docs about http headers storage and acls
    - added a VIM script for syntax color highlighting (Bruno Michel)

18 years ago[CONTRIB] added the 'except' keyword to haproxy.vim
Willy Tarreau [Sun, 1 Apr 2007 09:05:06 +0000 (11:05 +0200)] 
[CONTRIB] added the 'except' keyword to haproxy.vim

18 years ago[CONTRIB] added a VIM script for syntax coloring
Willy Tarreau [Sun, 1 Apr 2007 08:09:10 +0000 (10:09 +0200)] 
[CONTRIB] added a VIM script for syntax coloring

18 years ago[DOC] added some docs about http headers storage and acls
Willy Tarreau [Sun, 1 Apr 2007 07:44:10 +0000 (09:44 +0200)] 
[DOC] added some docs about http headers storage and acls

18 years ago[MEDIUM] splitted logs into two versions : TCP and HTTP
Willy Tarreau [Sat, 31 Mar 2007 23:30:43 +0000 (01:30 +0200)] 
[MEDIUM] splitted logs into two versions : TCP and HTTP

logs are handled better with dedicated functions. The HTTP implementation
moved to proto_http.c. It has been cleaned up a bit. Now a frontend with
option httplog and no log will not call the function anymore.

18 years ago[MEDIUM] removed now unused fiprm and beprm from proxies
Willy Tarreau [Sat, 31 Mar 2007 22:01:37 +0000 (00:01 +0200)] 
[MEDIUM] removed now unused fiprm and beprm from proxies

The fiprm and beprm were added to ease the transition between
a single listener mode to frontends+backends. They are no longer
needed and make the code a bit more complicated. Remove them.

18 years ago[BUG] fix reqadd when no option httpclose is used.
Willy Tarreau [Fri, 30 Mar 2007 10:02:43 +0000 (12:02 +0200)] 
[BUG] fix reqadd when no option httpclose is used.

Due to a code indentation mismatch, the rspadd headers were only
added if option httpclose was not set.

18 years ago[RELEASE] Released version 1.3.8 with the following changes : v1.3.8
Willy Tarreau [Sun, 25 Mar 2007 22:24:56 +0000 (00:24 +0200)] 
[RELEASE] Released version 1.3.8 with the following changes :

    - fixed several bugs which might have caused a crash with bad configs
    - several optimizations in header processing
    - many progresses towards transaction-based processing
    - option forwardfor may be used in frontends
    - completed HTTP response processing
    - some code refactoring between request and response processing
    - new HTTP header manipulation functions
    - optimizations on the recv() patch to reduce CPU usage under very
      high data rates.
    - more user-friendly help about the 'usesrc' keyword (CTTPROXY)
    - username/groupname support from Marcus Rueckert
    - added the "except" keyword to the "forwardfor" option (Bryan German)
    - support for health-checks on other addresses (Fabrice Dulaunoy)
    - makefile for MacOS 10.4 / Darwin (Dan Zinngrabe)
    - do not insert "Connection: close" in HTTP/1.0 messages

18 years ago[BUILD] cfgparse requires errno.h on OpenBSD.
Willy Tarreau [Sun, 25 Mar 2007 22:18:40 +0000 (00:18 +0200)] 
[BUILD] cfgparse requires errno.h on OpenBSD.

18 years ago[MEDIUM] do not add Connection: close in HTTP/1.0 mode
Willy Tarreau [Sun, 25 Mar 2007 21:47:23 +0000 (23:47 +0200)] 
[MEDIUM] do not add Connection: close in HTTP/1.0 mode

If we already are in HTTP/1.0 and if no connection: has been seen,
it is not necessary to add Connection: close.

18 years ago[DOC] added a CONTRIB file
Willy Tarreau [Sun, 25 Mar 2007 20:56:04 +0000 (22:56 +0200)] 
[DOC] added a CONTRIB file

Most useful contributions are acknowledged in this file.

18 years ago[CLEANUP] added a few missing newlines to the HTML report
Willy Tarreau [Sun, 25 Mar 2007 20:44:08 +0000 (22:44 +0200)] 
[CLEANUP] added a few missing newlines to the HTML report

Sometimes it is preferable that the HTML output can be parsed.
Ensure better use of the newlines for this.

18 years ago[MINOR] changed server weight storage from char to unsigned int
Willy Tarreau [Sun, 25 Mar 2007 19:16:40 +0000 (21:16 +0200)] 
[MINOR] changed server weight storage from char to unsigned int

This change does not affect memory usage much, but it simplifies the
code a lot by removing many +1/-1 operations on weights.

18 years ago[CLEANUP] slightly reorganized the struct server
Willy Tarreau [Sun, 25 Mar 2007 19:03:01 +0000 (21:03 +0200)] 
[CLEANUP] slightly reorganized the struct server

Struct server has gathered lots of informations over the time, but
it's better for clarity and performance to group those information
by usage, the most common ones at the top and the least ones at the
bottom.

18 years ago[MINOR] cleaned up the check_addr patch a bit
Willy Tarreau [Sun, 25 Mar 2007 18:46:19 +0000 (20:46 +0200)] 
[MINOR] cleaned up the check_addr patch a bit

removed useless set_check_addr entry and rely on check_addr itself.

18 years ago[BUILD] makefile for MacOS 10.4 / Darwin
Willy Tarreau [Sun, 25 Mar 2007 14:55:56 +0000 (16:55 +0200)] 
[BUILD] makefile for MacOS 10.4 / Darwin

Contribution from Dan Zinngrabe :

Here is a Makefile based on that for BSD that builds HAProxy 1.3.7 on
MacOS 10.4 and Darwin. I haven't tested it extensively yet, but it
does seem to work so far.

18 years ago[MEDIUM] add support for health-checks on other addresses
Willy Tarreau [Sun, 25 Mar 2007 14:45:16 +0000 (16:45 +0200)] 
[MEDIUM] add support for health-checks on other addresses

Patch from Fabrice Dulaunoy. Explanation below, and script
merged in examples/.

This patch allow to put a different address in the check part for each
server (and not only a specific port)

I need this feature because I've a complex settings where, when a specific
farm goes down, I need to switch a set of other farm either if these other
farm behave perfectly well.

For that purpose, I've made a small PERL daemon with some REGEX or PORT
test which allow me to test a bunch of thing.

18 years ago[DOC] update architecture guide
Willy Tarreau [Sat, 17 Mar 2007 20:55:50 +0000 (21:55 +0100)] 
[DOC] update architecture guide

Many useful updates to the architecture guide.

18 years ago[MEDIUM] add the "except" keyword to the "forwardfor" option
Willy Tarreau [Sun, 25 Mar 2007 14:00:04 +0000 (16:00 +0200)] 
[MEDIUM] add the "except" keyword to the "forwardfor" option

Patch from Bryan Germann for 1.2.17.
In some circumstances, it is useful not to add the X-Forwarded-For
header, for instance when the client is another reverse-proxy or
stunnel running on the same machine and which already adds it. This
patch adds the "except" keyword to the "forwardfor" option, allowing
to specify an address or network which will not be added to this
header.

18 years ago[MEDIUM] add user/groupname support
Willy Tarreau [Sun, 25 Mar 2007 13:39:23 +0000 (15:39 +0200)] 
[MEDIUM] add user/groupname support

Patch from Marcus Rueckert for 1.2.17 :
 "I added the attached patch to haproxy. I don't have a static uid/gid for
  haproxy so i need to specify the username/groupname to run it as non
  root user."

18 years ago[MEDIUM] check for cttproxy support when required
Willy Tarreau [Sat, 24 Mar 2007 16:24:39 +0000 (17:24 +0100)] 
[MEDIUM] check for cttproxy support when required

Previously, use of the "usesrc" keyword could silently fail if
either the module was not loaded, or the user did not have enough
permissions. Now the errors are better diagnosed and more appropriate
advices are given.

18 years ago[MINOR] more friendly reports of wrong uses of the usesrc keyword
Willy Tarreau [Sat, 24 Mar 2007 11:47:24 +0000 (12:47 +0100)] 
[MINOR] more friendly reports of wrong uses of the usesrc keyword

It was difficult to find how to enter the "usesrc" keyword. Now the
configuration checker is a bit more friendly and tries to identify
most mistakes and gives some hints back.

18 years ago[MINOR] read optimizations based on the MSS
Willy Tarreau [Fri, 23 Mar 2007 22:02:09 +0000 (23:02 +0100)] 
[MINOR] read optimizations based on the MSS

Generally, if a recv() returns less bytes than the MSS, it means that
there is nothing left in the system's buffers, and that it's not worth
trying to read again because we are very likely to get nothing. A
default read low limit has been set to 1460 bytes below which we stop
reading.

This has brought a little speed boost on small objects while maintaining
the same speed on large objects.

18 years ago[MEDIUM] re-implemented the multiple read polling
Willy Tarreau [Fri, 23 Mar 2007 21:39:59 +0000 (22:39 +0100)] 
[MEDIUM] re-implemented the multiple read polling

Multiple read polling was temporarily disabled, which had the side
effect of burning huge amounts of CPU on large objects. It has now
been re-implemented with a limit of 8 calls per wake-up, which seems
to provide best results at least on Linux.

18 years ago[BUG] fix pointer initializations for TCP connections.
Willy Tarreau [Mon, 19 Mar 2007 15:20:06 +0000 (16:20 +0100)] 
[BUG] fix pointer initializations for TCP connections.

Very recent changes consisting in moving some pointers to the
transaction instead of the session have lead to a bug because
those pointers were only initialized if the protocol was HTTP,
but they were freed based on their value. In some cases, it
was possible to cause double frees.

18 years ago[MINOR] added new function http_header_match2()
Willy Tarreau [Sun, 18 Mar 2007 22:50:16 +0000 (23:50 +0100)] 
[MINOR] added new function http_header_match2()

HTTP header matching is now made easier with http_header_match2().
Various locations have been adapted to use it. A small bug was also
fixed causing empty headers to be matched till next one.

18 years ago[MINOR] HTTP: factorize all the header insertions
Willy Tarreau [Sun, 18 Mar 2007 21:36:26 +0000 (22:36 +0100)] 
[MINOR] HTTP: factorize all the header insertions

Two new functions http_header_add_tail() and http_header_add_tail2()
make it easier to append headers, and also reduce the number of
sprintf() calls and perform stricter checks.

18 years ago[MINOR] used http_flush_cookie_flags() instead of a dirty code block
Willy Tarreau [Sun, 18 Mar 2007 19:53:22 +0000 (20:53 +0100)] 
[MINOR] used http_flush_cookie_flags() instead of a dirty code block

18 years ago[MINOR] move some flags from session.h to proto_http.h
Willy Tarreau [Sun, 18 Mar 2007 17:34:41 +0000 (18:34 +0100)] 
[MINOR] move some flags from session.h to proto_http.h

Some session flags were clearly related to HTTP transactions.
A new 'flags' field has been added to http_txn, and the
associated flags moved to proto_http.h.

18 years ago[CLEANUP] move http_txn out of session.h
Willy Tarreau [Sun, 18 Mar 2007 16:31:28 +0000 (17:31 +0100)] 
[CLEANUP] move http_txn out of session.h

The http_txn structure definitions moved to proto_http.h

18 years ago[CLEANUP] removed useless includes from streamsock.c
Willy Tarreau [Sun, 18 Mar 2007 16:03:19 +0000 (17:03 +0100)] 
[CLEANUP] removed useless includes from streamsock.c

18 years ago[MINOR] removed the ->h member in struct buffer
Willy Tarreau [Sun, 18 Mar 2007 15:31:29 +0000 (16:31 +0100)] 
[MINOR] removed the ->h member in struct buffer

The buffer does not need the header pointer anymore, it has
been removed everywhere.

18 years ago[MINOR] fix accounting for response bytes
Willy Tarreau [Sun, 18 Mar 2007 15:28:03 +0000 (16:28 +0100)] 
[MINOR] fix accounting for response bytes

A remaining reference to rep->h was replaced.

18 years ago[MAJOR] completed the HTTP response processing.
Willy Tarreau [Sun, 18 Mar 2007 15:22:39 +0000 (16:22 +0100)] 
[MAJOR] completed the HTTP response processing.

Now the response is correctly processed in the backend first
then in the frontend. It has followed intensive tests to
catch regressions, and everything seems OK now, but the code
is young anyway.

18 years ago[MINOR] code factoring : capture_headers() serves requests and responses
Willy Tarreau [Sun, 4 Mar 2007 17:17:17 +0000 (18:17 +0100)] 
[MINOR] code factoring : capture_headers() serves requests and responses

Both request and response captures will have to parse headers following
the same methods. It's better to factorize the code, hence the new
capture_headers() function.

18 years ago[MINOR] implement http_is_ver_token to fix response parsing
Willy Tarreau [Sun, 4 Mar 2007 17:13:58 +0000 (18:13 +0100)] 
[MINOR] implement http_is_ver_token to fix response parsing

This new character map improves accuracy when parsing HTTP version,
which helps inspecting requests, and fixes response handling.

18 years ago[MINOR] added new str2i* functions
Willy Tarreau [Sun, 4 Mar 2007 17:06:08 +0000 (18:06 +0100)] 
[MINOR] added new str2i* functions

Those functions provide faster and more flexible alternatives to atoi(),
some of which are able to work on sub-strings.

18 years ago[MINOR] option forwardfor is for frontends too
Willy Tarreau [Sat, 3 Mar 2007 18:17:03 +0000 (19:17 +0100)] 
[MINOR] option forwardfor is for frontends too

Finally, if the "option forwardfor" is specified in the frontend
and not in the backend, apply it.

18 years ago[CLEANUP] replaced occurrences of 'hreq' with 'txn' (bis)
Willy Tarreau [Sat, 3 Mar 2007 19:51:44 +0000 (20:51 +0100)] 
[CLEANUP] replaced occurrences of 'hreq' with 'txn' (bis)

Did the same in client.c

18 years ago[CLEANUP] replaced occurrences of 'hreq' with 'txn'
Willy Tarreau [Sat, 3 Mar 2007 15:23:22 +0000 (16:23 +0100)] 
[CLEANUP] replaced occurrences of 'hreq' with 'txn'

In many places, the variable "hreq" designated a transaction more than
a request. This has been changed to avoid confusion.

18 years ago[CLEANUP] renamed several HTTP structures
Willy Tarreau [Sat, 3 Mar 2007 12:54:32 +0000 (13:54 +0100)] 
[CLEANUP] renamed several HTTP structures

Some parts of HTTP processing were incorrectly called "request" while
they are messages or transactions. The following structure members
have changed :

  http_msg.hdr_state => msg_state
  http_msg.sor => som
  http_req.req_state => removed
  http_req => http_txn

18 years ago[DOC] add some doc about internal naming rules
Willy Tarreau [Sat, 3 Mar 2007 10:46:27 +0000 (11:46 +0100)] 
[DOC] add some doc about internal naming rules

18 years ago[MINOR] slightly optimize time calculation for rbtree
Willy Tarreau [Sun, 11 Feb 2007 23:59:08 +0000 (00:59 +0100)] 
[MINOR] slightly optimize time calculation for rbtree

The new rbtree-based scheduler makes heavy use of tv_cmp2(), and
this function becomes a huge CPU eater. Refine it a little bit in
order to slightly reduce CPU usage.

18 years ago[MINOR] uninline rb_insert_task_queue()
Willy Tarreau [Sun, 11 Feb 2007 12:52:16 +0000 (13:52 +0100)] 
[MINOR] uninline rb_insert_task_queue()

rb_insert_task_queue() was inlined and is quite large. Uninlining
it reduces code size by about 2 kB and slightly improves performance.

18 years ago[BUG] fix crash when no cookie is set on server
Willy Tarreau [Fri, 2 Feb 2007 21:14:47 +0000 (22:14 +0100)] 
[BUG] fix crash when no cookie is set on server

In cookie prefix or rewrite modes, if the elected server had no
cookie, a NULL pointer was passed to the rewrite function, causing
a SIGSEGV.

18 years ago[BUG] segfault on some erroneous configurations
Willy Tarreau [Thu, 1 Feb 2007 22:15:45 +0000 (23:15 +0100)] 
[BUG] segfault on some erroneous configurations

If captures were configured in a TCP-only listener, and
the logs were enabled, the proxy could segfault when
trying to scan the capture buffer which was NULL. Such
an erroneous configuration will not be possible anymore
soon, but let's avoid the problem for now by detecting
the NULL condition.

18 years ago[RELEASE] Released version 1.3.7 with the following changes : v1.3.7
Willy Tarreau [Fri, 26 Jan 2007 22:49:01 +0000 (23:49 +0100)] 
[RELEASE] Released version 1.3.7 with the following changes :

    - fix critical bug introduced with 1.3.6 : an empty request header
      may lead to a crash due to missing pointer assignment
    - hdr_idx might be left uninitialized in debug mode
    - fixed build on FreeBSD due to missing fd_set declaration

18 years ago[CRITICAL] an empty header may lead to a crash
Willy Tarreau [Fri, 26 Jan 2007 22:39:38 +0000 (23:39 +0100)] 
[CRITICAL] an empty header may lead to a crash

A missing pointer assignment in case of an empty header
will result in this header's length being 65535, causing
a SEGV when accessing the next header. It should not be
possible to exploit this problem to run arbitrary code
because the crash occurs while reading the data.

18 years ago[BUG] hdr_idx might be left uninitialized in some cases
Willy Tarreau [Thu, 25 Jan 2007 11:03:42 +0000 (12:03 +0100)] 
[BUG] hdr_idx might be left uninitialized in some cases

When a request is invalid during RQ_BEFORE AND the debug mode is active,
the hdr_idx might be used uninitialized. Let's initialize it right after
the accept() for now.

18 years ago[BUILD] fix build on FreeBSD (missing fd_set declaration)
Willy Tarreau [Wed, 24 Jan 2007 17:20:50 +0000 (18:20 +0100)] 
[BUILD] fix build on FreeBSD (missing fd_set declaration)

Sorin Pop reported a patch to fix build on FreeBSD.
The file common/standard.h used an fd_set in a declaration
but did not include enough headers for it to be known.

18 years ago[RELEASE] Released version 1.3.6.1 with the following change : v1.3.6.1
Willy Tarreau [Mon, 22 Jan 2007 07:57:44 +0000 (08:57 +0100)] 
[RELEASE] Released version 1.3.6.1 with the following change :

    - change in the header chaining broke cookies and authentication

18 years ago[MAJOR] invalid header offset broke cookies and authentication
Willy Tarreau [Mon, 22 Jan 2007 07:55:47 +0000 (08:55 +0100)] 
[MAJOR] invalid header offset broke cookies and authentication

Since the request is no longer part of the headers, cookies and
authentication did not work anymore. Obvious fix is to add the
request offset to the start pointer.

18 years ago[RELEASE] Released 1.3.6 with the following changes : v1.3.6
Willy Tarreau [Sun, 21 Jan 2007 23:56:46 +0000 (00:56 +0100)] 
[RELEASE] Released 1.3.6 with the following changes :
    - stats now support the HEAD method too
    - extracted http request from the session
    - huge rework of the HTTP parser which is now a 28-state FSM.
    - linux-style likely/unlikely macros for optimization hints
    - do not create a server socket when there's no server

18 years ago[MEDIUM] implemented the status-line parser in http_msg_analyzer().
Willy Tarreau [Sun, 21 Jan 2007 22:58:29 +0000 (23:58 +0100)] 
[MEDIUM] implemented the status-line parser in http_msg_analyzer().

The status line parser has been written. With it, it should not
be too hard to replace the response parser to benefit from the
new header facilities.

18 years ago[MINOR] move the response headers to the http_req
Willy Tarreau [Sun, 21 Jan 2007 19:49:31 +0000 (20:49 +0100)] 
[MINOR] move the response headers to the http_req

18 years ago[DOC] added a link to an excellent paper about HTTP load time
Willy Tarreau [Sun, 21 Jan 2007 18:18:55 +0000 (19:18 +0100)] 
[DOC] added a link to an excellent paper about HTTP load time

18 years ago[MAJOR] huge rework of the HTTP request FSM
Willy Tarreau [Sun, 21 Jan 2007 18:16:41 +0000 (19:16 +0100)] 
[MAJOR] huge rework of the HTTP request FSM

The HTTP parser has been rewritten for better compliance to RFC2616.
The same parser is now usable for both requests and responses, and
it now supports HTTP/0.9 as well as multi-line headers. It has also
been improved for speed ; a typicial HTTP request is parsed in about
2 microseconds on a 1 GHz processor.

The monitor-uri check has been moved so that the requests are not
logged. The httpclose option now tries to change as little as
possible in the request, and does not affect the first header if
it is already set to 'close'. HTTP/0.9 requests are converted to
HTTP/1.0 before being forwarded.

Headers and request transformations are now distinct. The headers
list is updated after each insertion/removal/transformation. The
request is re-parsed and checked after each transformation. It is
not possible anymore to remove a request, and requests which lead
to invalid request lines are now rejected.

18 years ago[BUG] last backend change broke server assignment
Willy Tarreau [Sun, 21 Jan 2007 11:47:26 +0000 (12:47 +0100)] 
[BUG] last backend change broke server assignment

Due to a change in the if/else paths, s->flags did not receive
the SN_ASSIGNED value anymore.

18 years ago[MINOR] do not create a socket if there is no server
Willy Tarreau [Sat, 20 Jan 2007 10:07:46 +0000 (11:07 +0100)] 
[MINOR] do not create a socket if there is no server

Since the distinction of backends and frontends, it has become
possible that some requests reach a frontend which has no
backend parameters. We must not create a socket on the backend
side just to destroy it later in such a case. The real problem
comes from the dispatch mode not being explictly stated.