added comment about evbuffer_add_file()

This commit is contained in:
Maxim Devaev
2022-02-05 14:35:07 +03:00
parent b3d1f06e5d
commit 19f9567098

View File

@@ -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;