Skip to content

Conversation

jessegeens
Copy link
Contributor

Currently, the video preview in public links is broken, because the browser sends a Range: bytes=0- request. Since EOS over gRPC returns a ReadCloser on the file, which is not seekable, Reva currently returns a 416 RequestedRangeNotSatisfiable response, breaking the video preview.

This PR modifies this behaviour to ignore the Range request in such cases.

Additionally, some errors where removed. For example, when the request does not contain bytes=, Reva currently returns an error. However, RFC 7233 states:

An origin server MUST ignore a Range header field that contains a range unit it does not understand

Thus, we now ignore these requests instead of returning a 416.

Copy link

update-docs bot commented Apr 2, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

… link video previews, returned a 416 response, causing the video player to break
@jessegeens jessegeens force-pushed the fix/openended-range branch from 7636c4e to 99e1cc4 Compare April 2, 2025 09:27
Copy link
Member

@glpatcern glpatcern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for adding a test case!

@jessegeens jessegeens merged commit 7dfcd40 into master Apr 2, 2025
15 checks passed
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.

2 participants