aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-hswitch.c
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-hswitch.c
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-hswitch.c')
-rw-r--r--src/afb-hswitch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/afb-hswitch.c b/src/afb-hswitch.c
index c6552d44..621856e9 100644
--- a/src/afb-hswitch.c
+++ b/src/afb-hswitch.c
@@ -73,7 +73,8 @@ int afb_hswitch_one_page_api_redirect(struct afb_hreq *hreq, void *data)
url[plen++] = '#';
url[plen++] = '!';
memcpy(&url[plen], &hreq->tail[1], hreq->lentail);
- return afb_hreq_redirect_to(hreq, url, 1);
+ afb_hreq_redirect_to(hreq, url, 1);
+ return 1;
}
int afb_hswitch_websocket_switch(struct afb_hreq *hreq, void *data)