aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-hreq.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-08-25 23:11:17 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-08-25 23:54:20 +0200
commitc44a48f295de04e4d0385b05d1afd93fac898d10 (patch)
tree68a6369f354dfbe8bfe4e4e266857dfcf8e5440a /src/afb-hreq.h
parent240329595f08192e7b88918cc8868b5af9504dc2 (diff)
makes a function to ensure trailing slash
This function is usefull to ensure that links to otherfile are epanded to directory/otherfile (not directoryotherfile!) Change-Id: If8ad1c275598b322516c41706b464d5d90067a8e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-hreq.h')
-rw-r--r--src/afb-hreq.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/afb-hreq.h b/src/afb-hreq.h
index 772cd677..81dd3eaf 100644
--- a/src/afb-hreq.h
+++ b/src/afb-hreq.h
@@ -61,7 +61,9 @@ extern int afb_hreq_reply_file_if_exist(struct afb_hreq *request, int dirfd, con
extern int afb_hreq_reply_file(struct afb_hreq *request, int dirfd, const char *filename);
-extern int afb_hreq_redirect_to(struct afb_hreq *request, const char *url, int add_query_part);
+extern void afb_hreq_redirect_to(struct afb_hreq *request, const char *url, int add_query_part);
+
+extern int afb_hreq_redirect_to_ending_slash_if_needed(struct afb_hreq *hreq);
extern const char *afb_hreq_get_cookie(struct afb_hreq *hreq, const char *name);