Open Bug 1765025 Opened 2 years ago Updated 2 years ago

Incorrect use of Content-Length when Content-Range has no complete-length field

Categories

(Core :: Audio/Video: Playback, defect)

defect

Tracking

()

ASSIGNED

People

(Reporter: karlt, Assigned: karlt)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/1c54648c082efdeb08cf6a5e3a8187e83f7549b9/dom/media/ChannelMediaResource.cpp#203,226,241,244

Since bug 1418430 was fixed, Gecko has intentionally accepted 206 Partial Content responses that do not fulfil the complete range requested. Such responses have a Content-Length header indicating the number of octets in the response body, which should not be interpreted as the entire resource length.

The effect is a media resource truncated at the end of the first partial response.

The check for zero mOffset would have been necessary when using Content-Length from (fully request-fulfilling) Partial Content responses, but is not necessary for 200 OK responses nor when using the complete-length field from Content-Range headers.

and use resource lengths available even when not the initial request.
This has the effect of using the most recent indication of resource length.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: