mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-08 06:09:44 +00:00
80aca90ad2
Samples fetches were relying on two flags SMP_CAP_REQ/SMP_CAP_RES to describe whether they were compatible with requests rules or with response rules. This was never reliable because we need a finer granularity (eg: an HTTP request method needs to parse an HTTP request, and is available past this point). Some fetches are also dependant on the context (eg: "hdr" uses request or response depending where it's involved, causing some abiguity). In order to solve this, we need to precisely indicate in fetches what they use, and their users will have to compare with what they have. So now we have a bunch of bits indicating where the sample is fetched in the processing chain, with a few variants indicating for some of them if it is permanent or volatile (eg: an HTTP status is stored into the transaction so it is permanent, despite being caught in the response contents). The fetches also have a second mask indicating their validity domain. This one is computed from a conversion table at registration time, so there is no need for doing it by hand. This validity domain consists in a bitmask with one bit set for each usage point in the processing chain. Some provisions were made for upcoming controls such as connection-based TCP rules which apply on top of the connection layer but before instantiating the session. Then everywhere a fetch is used, the bit for the control point is checked in the fetch's validity domain, and it becomes possible to finely ensure that a fetch will work or not. Note that we need these two separate bitfields because some fetches are usable both in request and response (eg: "hdr", "payload"). So the keyword will have a "use" field made of a combination of several SMP_USE_* values, which will be converted into a wider list of SMP_VAL_* flags. The knowledge of permanent vs dynamic information has disappeared for now, as it was never used. Later we'll probably reintroduce it differently when dealing with variables. Its only use at the moment could have been to avoid caching a dynamic rate measurement, but nothing is cached as of now. |
||
---|---|---|
.. | ||
acl.h | ||
arg.h | ||
auth.h | ||
backend.h | ||
channel.h | ||
checks.h | ||
compression.h | ||
connection.h | ||
cttproxy.h | ||
dumpstats.h | ||
fd.h | ||
freq_ctr.h | ||
frontend.h | ||
hdr_idx.h | ||
lb_chash.h | ||
lb_fas.h | ||
lb_fwlc.h | ||
lb_fwrr.h | ||
lb_map.h | ||
listener.h | ||
log.h | ||
obj_type.h | ||
peers.h | ||
pipe.h | ||
port_range.h | ||
proto_http.h | ||
proto_tcp.h | ||
proto_uxst.h | ||
protocol.h | ||
proxy.h | ||
queue.h | ||
raw_sock.h | ||
sample.h | ||
server.h | ||
session.h | ||
shctx.h | ||
signal.h | ||
ssl_sock.h | ||
stick_table.h | ||
stream_interface.h | ||
task.h | ||
template.h |