diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 6b0a6a80..6d343be1 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -941,6 +941,8 @@ void prepare_response(Stream *stream, Http2Handler *hd, bool allow_push = true) } if(buf.st_mode & S_IFDIR) { + close(file); + if(query_pos == std::string::npos) { reqpath += "/"; } else {