]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: samples: move payload-based fetches and ACLs to their own file
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2013 20:59:07 +0000 (21:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 3 Apr 2013 00:12:57 +0000 (02:12 +0200)
commitd4c33c8889ec37c35bee1b21b89e319868ebe366
treea708160144d27c8242a625f750c0e06163f25fc1
parent434c57c95cd8c99e4bb4865bee427d62063f0f3a
MEDIUM: samples: move payload-based fetches and ACLs to their own file

The file acl.c is a real mess, it both contains functions to parse and
process ACLs, and some sample extraction functions which act on buffers.
Some other payload analysers were arbitrarily dispatched to proto_tcp.c.

So now we're moving all payload-based fetches and ACLs to payload.c
which is capable of extracting data from buffers and rely on everything
that is protocol-independant. That way we can safely inflate this file
and only use the other ones when some fetches are really specific (eg:
HTTP, SSL, ...).

As a result of this cleanup, the following new sample fetches became
available even if they're not really useful :

  always_false, always_true, rep_ssl_hello_type, rdp_cookie_cnt,
  req_len, req_ssl_hello_type, req_ssl_sni, req_ssl_ver, wait_end

The function 'acl_fetch_nothing' was wrong and never used anywhere so it
was removed.

The "rdp_cookie" sample fetch used to have a mandatory argument while it
was optional in ACLs, which are supposed to iterate over RDP cookies. So
we're making it optional as a fetch too, and it will return the first one.
Makefile
Makefile.bsd
Makefile.osx
doc/configuration.txt
include/proto/acl.h
include/proto/payload.h [new file with mode: 0644]
include/proto/proto_tcp.h
src/acl.c
src/backend.c
src/payload.c [new file with mode: 0644]
src/proto_tcp.c