Added "Accept-Ranges" header when serving arbitrary data.

Allows for video seeking when using URL playback, even though the Range header isn't implemented yet. This could be heavily optimized by adding full support of the Range/Content-Range headers, however this is still a big step forward as it allows for (inefficient) seeking.
This commit is contained in:
CalDescent 2023-04-28 10:12:16 +01:00
parent 1ce2dcfb2b
commit 5dbacc4db3

View File

@ -1341,6 +1341,7 @@ public class ArbitraryResource {
data = Base64.encode(data);
}
response.addHeader("Accept-Ranges", "bytes");
response.setContentType(context.getMimeType(path.toString()));
response.setContentLength(data.length);
response.getOutputStream().write(data);