]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: http: remove some leftovers from recent cleanups
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Oct 2018 16:37:27 +0000 (18:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Oct 2018 16:37:27 +0000 (18:37 +0200)
The prototypes of functions find_hdr_value_end(), extract_cookie_value()
and http_header_match2() were still in proto_http.h while some of them
don't exist anymore and the others were just moved. Let's remove them.
In addition, da.c was updated to use http_extract_cookie_value() which
is the correct one.

include/proto/proto_http.h
src/da.c

index daa72bb6370042c390b4c226f4491da19368b8f1..1829c6830b853206aa93e313c4046f87ff3056a4 100644 (file)
@@ -82,10 +82,6 @@ int http_find_header2(const char *name, int len,
                      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, size_t *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);
 int http_replace_req_line(int action, const char *replace, int len, struct proxy *px, struct stream *s);
index c6538481204671c2162cd94f343878f5a16fc471..990267a3c1e80b58d3620312210da69246463340 100644 (file)
--- a/src/da.c
+++ b/src/da.c
@@ -2,6 +2,7 @@
 
 #include <common/cfgparse.h>
 #include <common/errors.h>
+#include <common/http.h>
 #include <proto/arg.h>
 #include <proto/http_fetch.h>
 #include <proto/log.h>
@@ -335,7 +336,7 @@ static int da_haproxy_fetch(const struct arg *args, struct sample *smp, const ch
                         * The cookie value, if it exists, is located between the current header's
                         * value position and the next one
                         */
-                       if (extract_cookie_value(pval, eval, global_deviceatlas.cookiename,
+                       if (http_extract_cookie_value(pval, eval, global_deviceatlas.cookiename,
                                global_deviceatlas.cookienamelen, 1, &p, &pl) == NULL) {
                                continue;
                        }