Re: [RFC PATCH 1/8] MINOR: uri_normalizer: Add uri_normalizer module

2021-04-13 Thread Christopher Faulet

Le 08/04/2021 à 20:59, Tim Duesterhus a écrit :

Willy,
Christopher,

I used uri_auth.[ch] as the basis for the source file structure (comments and
stuff).



Thanks, nothing to say about this one :)

--
Christopher Faulet



[RFC PATCH 1/8] MINOR: uri_normalizer: Add uri_normalizer module

2021-04-08 Thread Tim Duesterhus
Willy,
Christopher,

I used uri_auth.[ch] as the basis for the source file structure (comments and
stuff).

Best regards
Tim Düsterhus

Apply with `git am --scissors` to automatically cut the commit message.

-- >8 --
This is in preparation for future patches.
---
 Makefile |  3 ++-
 include/haproxy/uri_normalizer.h | 24 
 src/uri_normalizer.c | 21 +
 3 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 include/haproxy/uri_normalizer.h
 create mode 100644 src/uri_normalizer.c

diff --git a/Makefile b/Makefile
index 9b22fe4be..0d497747b 100644
--- a/Makefile
+++ b/Makefile
@@ -883,7 +883,8 @@ OBJS += src/mux_h2.o src/mux_fcgi.o src/http_ana.o 
src/stream.o\
 src/ebistree.o src/auth.o src/wdt.o src/http_acl.o 
\
 src/hpack-enc.o src/hpack-huff.o src/ebtree.o src/base64.o 
\
 src/hash.o src/dgram.o src/version.o src/fix.o src/mqtt.o src/dns.o
\
-src/server_state.o src/proto_uxdg.o src/init.o src/cfgdiag.o
+src/server_state.o src/proto_uxdg.o src/init.o src/cfgdiag.o   
\
+src/uri_normalizer.o
 
 ifneq ($(TRACE),)
 OBJS += src/calltrace.o
diff --git a/include/haproxy/uri_normalizer.h b/include/haproxy/uri_normalizer.h
new file mode 100644
index 0..82ef97324
--- /dev/null
+++ b/include/haproxy/uri_normalizer.h
@@ -0,0 +1,24 @@
+/*
+ * include/haproxy/uri_normalizer.h
+ * HTTP request URI normalization.
+ *
+ * Copyright 2021 Tim Duesterhus 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _HAPROXY_URI_NORMALIZER_H
+#define _HAPROXY_URI_NORMALIZER_H
+
+#endif /* _HAPROXY_URI_NORMALIZER_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
diff --git a/src/uri_normalizer.c b/src/uri_normalizer.c
new file mode 100644
index 0..7db47d198
--- /dev/null
+++ b/src/uri_normalizer.c
@@ -0,0 +1,21 @@
+/*
+ * HTTP request URI normalization.
+ *
+ * Copyright 2021 Tim Duesterhus 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#include 
+#include 
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
-- 
2.31.1