From 0ee1ad5675b77dd65dce4b364b24a9fc09044962 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Thu, 15 Apr 2021 21:45:56 +0200 Subject: [PATCH] MINOR: uri_normalizer: Add `enum uri_normalizer_err` This enum will serve as the return type for each normalizer. --- include/haproxy/uri_normalizer-t.h | 31 +++++++++++++++++++++++++++++++ include/haproxy/uri_normalizer.h | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 include/haproxy/uri_normalizer-t.h diff --git a/include/haproxy/uri_normalizer-t.h b/include/haproxy/uri_normalizer-t.h new file mode 100644 index 0000000..bcbcaef --- /dev/null +++ b/include/haproxy/uri_normalizer-t.h @@ -0,0 +1,31 @@ +/* + * 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_T_H +#define _HAPROXY_URI_NORMALIZER_T_H + +enum uri_normalizer_err { + URI_NORMALIZER_ERR_NONE = 0, + URI_NORMALIZER_ERR_ALLOC, + URI_NORMALIZER_ERR_INVALID_INPUT, + URI_NORMALIZER_ERR_INTERNAL_ERROR = 0xdead, +}; + +#endif /* _HAPROXY_URI_NORMALIZER_T_H */ + +/* + * Local variables: + * c-indent-level: 8 + * c-basic-offset: 8 + * End: + */ diff --git a/include/haproxy/uri_normalizer.h b/include/haproxy/uri_normalizer.h index 82ef973..20341a9 100644 --- a/include/haproxy/uri_normalizer.h +++ b/include/haproxy/uri_normalizer.h @@ -14,6 +14,8 @@ #ifndef _HAPROXY_URI_NORMALIZER_H #define _HAPROXY_URI_NORMALIZER_H +#include + #endif /* _HAPROXY_URI_NORMALIZER_H */ /* -- 1.7.10.4