From 19f95670987292649a5befde1ad12ebcbe33b661 Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Sat, 5 Feb 2022 14:35:07 +0300 Subject: [PATCH] added comment about evbuffer_add_file() --- src/ustreamer/http/server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ustreamer/http/server.c b/src/ustreamer/http/server.c index 9191832..532f744 100644 --- a/src/ustreamer/http/server.c +++ b/src/ustreamer/http/server.c @@ -317,7 +317,10 @@ static void _http_callback_static(struct evhttp_request *request, void *v_server goto not_found; } + // evbuffer_add_file() owns the resulting file descriptor + // and will close it when finished transferring data fd = -1; + ADD_HEADER("Content-Type", guess_mime_type(static_path)); evhttp_send_reply(request, HTTP_OK, "OK", buf); goto cleanup;