From 99857208eac962b7cc58042e1ea33fe6b46f7bd5 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 16 Dec 2011 22:05:55 +0100 Subject: EXP: http: make acl_fetch_hdr() use http_get_hdr() This currently does not bring any value and is more for a proof-of-concept. It will be useful when we support the ability to specify which occurrence we want to match. --- src/proto_http.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/proto_http.c b/src/proto_http.c index 1906916..a627cc4 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -8038,12 +8038,10 @@ acl_fetch_hdr(struct proxy *px, struct session *l4, void *l7, char *sol, /* search for header from the beginning */ ctx->idx = 0; - if (http_find_header2(expr->arg.str, expr->arg_len, sol, idx, ctx)) { + if (http_get_hdr(&txn->req, expr->arg.str, expr->arg_len, idx, + 0, ctx, &temp_pattern.data.str.str, &temp_pattern.data.str.len)) { test->flags |= ACL_TEST_F_FETCH_MORE; test->flags |= ACL_TEST_F_VOL_HDR; - temp_pattern.data.str.str = (char *)ctx->line + ctx->val; - temp_pattern.data.str.len = ctx->vlen; - return 1; } -- 1.7.2.3