From: David Carlier Date: Fri, 25 Sep 2015 13:10:50 +0000 (+0100) Subject: MINOR: proto_http: Externalisation of previously internal functions X-Git-Tag: v1.6-dev6~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4686f792b45ac7d29442e4cb9724dca25b9e18a9;p=thirdparty%2Fhaproxy.git MINOR: proto_http: Externalisation of previously internal functions Needs to expose the HTTP headers 'iterator' and the client's cookie value extraction functions. --- diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h index f5aef3bae4..0446b45d6d 100644 --- a/include/proto/proto_http.h +++ b/include/proto/proto_http.h @@ -97,7 +97,11 @@ int http_find_full_header2(const char *name, int len, int http_find_header2(const char *name, int len, char *sol, struct hdr_idx *idx, struct hdr_ctx *ctx); +int http_find_next_header(char *sol, struct hdr_idx *idx, + struct hdr_ctx *ctx); char *find_hdr_value_end(char *s, const char *e); +char *extract_cookie_value(char *hdr, const char *hdr_end, char *cookie_name, + size_t cookie_name_l, int list, char **value, int *value_l); int http_header_match2(const char *hdr, const char *end, const char *name, int len); int http_remove_header2(struct http_msg *msg, struct hdr_idx *idx, struct hdr_ctx *ctx); int http_header_add_tail2(struct http_msg *msg, struct hdr_idx *hdr_idx, const char *text, int len); diff --git a/src/proto_http.c b/src/proto_http.c index 41858bf765..f06975d3a2 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -10993,7 +10993,7 @@ smp_fetch_http_auth_grp(const struct arg *args, struct sample *smp, const char * * of values (cookie headers). This makes it faster to abort parsing when no * list is expected. */ -static char * +char * extract_cookie_value(char *hdr, const char *hdr_end, char *cookie_name, size_t cookie_name_l, int list, char **value, int *value_l)