Browse Source

[mod_flv_streaming] check range before sending FLV

check range before sending FLV header
master
Glenn Strauss 7 months ago
parent
commit
1d9fe2a3d6
  1. 5
      src/mod_flv_streaming.c

5
src/mod_flv_streaming.c

@ -123,8 +123,9 @@ URIHANDLER_FUNC(mod_flv_streaming_path_handler) {
r->http_status = (errno == ENOENT) ? 404 : 403;
return HANDLER_FINISHED;
}
if (0 == sce->st.st_size)
if (len == -1 || sce->st.st_size - start < len)
len = sce->st.st_size - start;
if (len <= 0)
return HANDLER_FINISHED;
/* if there is a start=[0-9]+ in the header use it as start,

Loading…
Cancel
Save