From 37d2f8cb438f68eaa1da8a56ea9ce5023091f128 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 24 Oct 2023 09:59:08 +0000 Subject: Full custom header support, switch not made yet Signed-off-by: Laurent Bercot --- src/include/tipidee/conf.h | 4 +++- src/include/tipidee/response.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/tipidee/conf.h b/src/include/tipidee/conf.h index d0b8fb0..5f3b697 100644 --- a/src/include/tipidee/conf.h +++ b/src/include/tipidee/conf.h @@ -35,7 +35,9 @@ extern int tipidee_conf_init (tipidee_conf *, char const *) ; extern int tipidee_conf_get (tipidee_conf const *, char const *, cdb_data *) ; extern char const *tipidee_conf_get_string (tipidee_conf const *, char const *) ; extern int tipidee_conf_get_uint32 (tipidee_conf const *, char const *, uint32_t *) ; -extern unsigned int tipidee_conf_get_argv (tipidee_conf const *, char const *, char const **, unsigned int, size_t *) ; +extern uint32_t tipidee_conf_get_argv (tipidee_conf const *, char const *, char const **, uint32_t, size_t *) ; + +extern char const *tipidee_conf_get_responseheaders (tipidee_conf const *, char const *, uint32_t *, uint32_t *) ; extern char const *tipidee_conf_get_docroot (tipidee_conf const *, tipidee_uri const *, uint16_t) ; extern int tipidee_conf_get_redirection (tipidee_conf const *, char const *, size_t, char const *, tipidee_redirection *) ; diff --git a/src/include/tipidee/response.h b/src/include/tipidee/response.h index 3850970..bc83fc6 100644 --- a/src/include/tipidee/response.h +++ b/src/include/tipidee/response.h @@ -16,6 +16,14 @@ #include +typedef struct tipidee_response_header_s tipidee_response_header, *tipidee_response_header_ref ; +struct tipidee_response_header_s +{ + char const *key ; + char const *value ; + uint8_t options ; +} ; + typedef struct tipidee_response_header_builtin_s tipidee_response_header_builtin, *tipidee_response_header_builtin_ref ; struct tipidee_response_header_builtin_s { @@ -42,4 +50,6 @@ extern size_t tipidee_response_error_nofile (buffer *, tipidee_rql const *, unsi extern tipidee_response_header_builtin const *tipidee_response_header_builtin_table ; extern char const *tipidee_response_header_builtin_search (char const *) ; +extern int tipidee_response_header_preparebuiltin (tipidee_response_header *, uint32_t, char const *, size_t) ; + #endif -- cgit v1.3.1