summaryrefslogtreecommitdiffstats
path: root/src/http-svc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http-svc.c')
-rw-r--r--src/http-svc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/http-svc.c b/src/http-svc.c
index 9fa6e84c..706abbc5 100644
--- a/src/http-svc.c
+++ b/src/http-svc.c
@@ -175,11 +175,11 @@ static int afb_hreq_rest_api(struct afb_hreq *hreq, void *data)
const char *api, *verb;
size_t lenapi, lenverb;
- api = hreq->tail;
- lenapi = strspn(api, "/");
- verb = &hreq->tail[lenapi];
- verb = &verb[strcspn(verb, "/")];
- lenverb = strspn(verb, "/");
+ api = &hreq->tail[strspn(hreq->tail, "/")];
+ lenapi = strcspn(api, "/");
+ verb = &api[lenapi];
+ verb = &verb[strspn(verb, "/")];
+ lenverb = strcspn(verb, "/");
if (!(*api && *verb && lenapi && lenverb))
return 0;