mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-17 21:13:42 +00:00
fixed serving of empty static files
This commit is contained in:
@@ -326,7 +326,7 @@ static void _http_callback_static(struct evhttp_request *request, void *v_server
|
|||||||
goto not_found;
|
goto not_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evbuffer_add_file(buf, fd, 0, st.st_size) < 0) {
|
if (st.st_size > 0 && evbuffer_add_file(buf, fd, 0, st.st_size) < 0) {
|
||||||
LOG_ERROR("HTTP: Can't serve static file %s", static_path);
|
LOG_ERROR("HTTP: Can't serve static file %s", static_path);
|
||||||
goto not_found;
|
goto not_found;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user