*/
#define _GNU_SOURCE
-#include <microhttpd.h>
+
+#include <stdio.h>
+#include <string.h>
#include <assert.h>
#include <poll.h>
+#include <fcntl.h>
#include <sys/stat.h>
-#include "../include/local-def.h"
+#include <microhttpd.h>
+
+#include "local-def.h"
#include "afb-method.h"
#include "afb-hreq.h"
#include "afb-websock.h"
uuid = afb_hreq_get_argument(hreq, uuid_arg);
if (uuid == NULL)
uuid = afb_hreq_get_cookie(hreq, uuid_cookie);
- hreq->context = _ctxClientGet(uuid);
+ hreq->context = ctxClientGet(uuid);
}
return hreq->context;
}
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;