MEDIUM: http: move header captures from http_txn to struct stream
The header captures are now general purpose captures since tcp rules
can use them to capture various contents. That removes a dependency
on http_txn that appeared in some sample fetch functions and in the
order by which captures and http_txn were allocated.
Interestingly the reset of the header captures were done at too many
places as http_init_txn() used to do it while it was done previously
in every call place.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 6a67785..e77edc4 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -1190,7 +1190,7 @@
else if (rule->action == TCP_ACT_CAPTURE) {
struct sample *key;
struct cap_hdr *h = rule->act_prm.cap.hdr;
- char **cap = s->txn.req.cap;
+ char **cap = s->req_cap;
int len;
key = sample_fetch_string(s->be, s, &s->txn, SMP_OPT_DIR_REQ | partial, rule->act_prm.cap.expr);