Skip to content

Implement Range Requests#31

Open
Dimava wants to merge 2 commits into
elysiajs:mainfrom
Dimava:range
Open

Implement Range Requests#31
Dimava wants to merge 2 commits into
elysiajs:mainfrom
Dimava:range

Conversation

@Dimava
Copy link
Copy Markdown

@Dimava Dimava commented Jun 23, 2024

Resolves #19

@suside
Copy link
Copy Markdown

suside commented Jul 3, 2025

This implementation will fail when Range: bytes=0- is sent (chrome).
Im testing this currently with:

    const [start = 0, end = file.size] = range
        .split('=') // ["Range: bytes", "0-100"]
        .at(-1)! // "0-100"
        .split('-') // ["0", "100"]
        .filter(str => str.length)
        .map(Number) // [0, 100]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Implement Range Requests for <video> / <audio>

2 participants