This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user