fix: http 416 replies had malformed header
Massimo Melina committed
Oct 27, 2025 at 23:15 UTC
b7113cadacb681d8947efa53d5223fa1852b186c
1 file changed
+1
-1
src/serveFile.ts
+1
-1
@@ -156,7 +156,7 @@ export function applyRange(ctx: Koa.Context, totalSize=ctx.response.length) {
156
// we don't support last-bytes without knowing max
157
if (isNaN(end) && isNaN(max) || end > max || start > max) {
158
ctx.status = HTTP_RANGE_NOT_SATISFIABLE
159
- ctx.set('Content-Range', `bytes ${totalSize}`)
159
+ ctx.set('Content-Range', `bytes */${totalSize}`)
160
ctx.body = 'Requested Range Not Satisfiable'
161
return
162
}