]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: http_ext: introduce http ext converters
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 29 Dec 2022 17:32:19 +0000 (18:32 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Jan 2023 14:18:59 +0000 (15:18 +0100)
This commit is really simple, it adds the required skeleton code to allow
new http_ext converter to be easily registered through STG_REGISTER facility.

src/http_ext.c

index 6a922e6f572effcd25fd08fb8ee0aca472f49630..1c621a66a7dd1bfda24ce5666ffbbc8de53638f4 100644 (file)
@@ -21,6 +21,8 @@
 #include <haproxy/sc_strm.h>
 #include <haproxy/obj_type.h>
 #include <haproxy/cfgparse.h>
+#include <haproxy/arg.h>
+#include <haproxy/initcall.h>
 #include <haproxy/tools.h>
 
 /* check if char is a valid obfuscated identifier char
@@ -1362,3 +1364,15 @@ void http_ext_xot_copy(struct http_ext_xot *dest, const struct http_ext_xot *ori
                dest->hdr_name = istdup(orig->hdr_name);
        dest->except_net = orig->except_net;
 }
+
+/*
+ * =========== CONV ===========
+ * related converters
+ */
+
+/* Note: must not be declared <const> as its list will be overwritten */
+static struct sample_conv_kw_list sample_conv_kws = {ILH, {
+       { NULL, NULL, 0, 0, 0 },
+}};
+
+INITCALL1(STG_REGISTER, sample_register_convs, &sample_conv_kws);