diff --git a/httpd/src/http/http.c b/httpd/src/http/http.c index 30229f2..281d132 100644 --- a/httpd/src/http/http.c +++ b/httpd/src/http/http.c @@ -117,15 +117,15 @@ struct http_request *parse_request(struct string *req) // TODO handle logs and free adequately struct http_response *generate_response(struct http_request *req) { + // Path + // Check filename if (!check_filename(req->path)) return NULL; - int err = is_directory(req->path->data); if (err == -1) return NULL; - - if (err == 1) + else if (err == 1) { string_concat_str(req->path, "/", 1); string_concat_str(req->path, config->servers->default_file,