wip Update
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
NADAL Jean-Baptiste
2020-01-24 18:27:42 +01:00
parent ce452dd4b8
commit 013d541769
3 changed files with 604 additions and 10 deletions

View File

@@ -213,12 +213,12 @@ int restd_rest_handler(short event, restd_conn_t *conn)
restd_hook_t *hook = (restd_hook_t *)obj.data;
if (hook->cb)
{
// printf("==== ZOB call_hooks: method: %s - %s \n", hook->method, conn->method);
// printf("==== call_hooks: path: %s - %s\n", hook->path, http->request.path);
// printf("==== HOOK FOUND !!!!\n");
printf("==== call_hooks: method: %s - %s \n", hook->method, conn->method);
printf("==== call_hooks: path: %s - %s\n", hook->path, http->request.path);
printf("==== HOOK FOUND !!!!\n");
if ((hook->method == NULL) || (conn->method == NULL) || (strcmp(hook->method, conn->method) != 0))
{
// printf("==== Hook found but method failed -> next.\n");
printf("==== Hook found but method failed -> next.\n");
reason = RESTD_ERROR_METHOD_NOT_ALLOWED;
continue;
}