-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSC3469: Mandate HTTP Range on Content Repository Endpoints #3469
Open
ShadowJonathan
wants to merge
3
commits into
matrix-org:main
Choose a base branch
from
ShadowJonathan:require-http-range
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# MSC3469: HTTP Range on content repository | ||
|
||
## Proposal | ||
|
||
This MSC aims to make HTTP Range capability *mandatory* on the content repository fetch endpoint. | ||
|
||
[HTTP Range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests) is a Header-based | ||
method by which browsers and other clients can request a certain byte-range of a file. | ||
|
||
Most modern browsers depend on this mechanism to scrub through video footage, and the absence would | ||
make some media playback unable to be scrubbed through. | ||
|
||
This would only affect CS endpoint `/_matrix/media/v3/download/{serverName}/{mediaId}`. | ||
|
||
## Additional context | ||
|
||
Related: https://github.com/vector-im/element-web/issues/4265 | ||
|
||
This MSC is to make the behavior standard, and consistent across the matrix ecosystem. | ||
|
||
## Unstable prefix | ||
|
||
This MSC would only add a well-known HTTP capability to an existing endpoint, which can easily be | ||
ignored by existing clients, I think it's overkill to require an unstable prefix for this. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a strong rationale for why we should mandate it in the spec. Considering this is a http feature, we rarely (if ever) need to specify how servers use HTTP features. For example, we don't mandate that servers (or clients) use
Content-Type: application/json
I'm heavily inclined to leave this as an implementation detail given it's "good to have" but not a requirement for the protocol to operate. At best, this could be a suggestion in the spec which doesn't require an MSC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently there's 0 mention or recommendation about this in the spec, thus the MSC.
I don't think that separating concerns and leaving it to "a HTTP-specific thing" is reasonable here, as I've seen little indication, guidelines, thoughts, or otherwise to genuinely abstract matrix to other protocols, even low-bandwidth just maps existing HTTP endpoints to be converted into CoAP. This is in the interest of clients to be able to rely on this, for example, for resumable downloads, I think that integrating this in the spec (even as a "if you use HTTP, support this" wording) would raise the level of quality that clients can expect from servers, instead of only finding it optional.
HTTP Range is nearly ubiquitous on the internet today, I think that this is expected, and I think it's reasonable for the spec to enforce that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary reason why this could be useful is for clients resuming or scrubbing through media, which both are pretty useful on its own, this MSC would only make it so that all servers and media repositories have to present that same interface, so that matrix clients can fully rely on it always existing on the server, standardisation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion for mandating is actually not standardization but simply usability for the end user. Imagine a homeserver with high upload limits (those realistically exist) and a lets say 2GB video file. Today a user has to first download the whole file, then scrubs, then realizes he needed only minute 2 to minute 3. But had to wait 10m for the video to load. Being able to directly jump in those cases would highly improve usability and quality of clients in matrix as a whole in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the latency here. I still strongly believe that this can be done as a note in the actual spec, without the requirement of an MSC. "Servers may wish to implement [HTTP Range] request support", for example.
Enforcing/requiring it would mean having an MSC, though imo a stronger argument is also needed to send such a proposal through FCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for clarity: I believe a spec PR can be opened and MSC closed for this particular feature, at least as a
SHOULD
. If the goal is to make theRange
header support aMUST
, the MSC needs a stronger use case imo.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is blocking an important user experience feature, what can be done to get this moving, and then implemented in synapse?