diff --git a/.drone.yml b/.drone.yml index 4f5821d..588e576 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,7 +20,7 @@ steps: image: registry.nadal-fr.com/buildroot_dev commands: - mkdir -p domo-iot/build - - cd domo-iot/build && cmake .. -DDOMO_BUILD_TEST=ON + - cd domo-iot/build && cmake .. -DDOMO_BUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug - make - name: test diff --git a/lib/src/restd.c b/lib/src/restd.c index c7f61c6..d677508 100644 --- a/lib/src/restd.c +++ b/lib/src/restd.c @@ -849,7 +849,7 @@ void rest_request_cb(struct evhttp_request *req, void *arg) } else { - // TODO 404 + evhttp_send_error(req, HTTP_NOTFOUND, NULL); } } diff --git a/src/tests/test_rest.c b/src/tests/test_rest.c index 8dec65e..05daea2 100644 --- a/src/tests/test_rest.c +++ b/src/tests/test_rest.c @@ -635,5 +635,8 @@ TEST("Rest - Test Web server part.\t") ASSERT_EQUAL_INT(ret, 0); } + ret = exec_request(kput_method, "http://localhost:" kserver_port "/not_found.html", 404, "", "404 Not Found

404 Not Found

", false); + ASSERT_EQUAL_INT(ret, 0); + restd_server_free(rest_server); } \ No newline at end of file