Skip to content

Commit 57d5716

Browse files
committed
Fix media not playing in chrome as the content-range header was misformed.
1 parent bfb94bb commit 57d5716

File tree

2 files changed

+43
-46
lines changed

2 files changed

+43
-46
lines changed

.idea/workspace.xml

Lines changed: 42 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/xyz/nulldev/wls/routes/slave/GetFileRoute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public Object handle(Request request, Response response) throws Exception {
8181
}
8282
response.status(statusCode);
8383
response.header("Content-Length", String.valueOf(fileEnd - fileStart + 1));
84-
response.header("Content-Range", fileStart + "-" + fileEnd + "/" + length);
84+
response.header("Content-Range", "bytes " + fileStart + "-" + fileEnd + "/" + length);
8585
try (BufferedInputStream stream
8686
= new BufferedInputStream(new FileInputStream(resolvedFile));
8787
ServletOutputStream outputStream

0 commit comments

Comments
 (0)