Closed Bug 1765025 Opened 3 years ago Closed 6 months ago

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

Categories

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

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

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.

Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/59d1800b85db don't get resource length from Content-Length of 206 Partial Content response with no complete-length r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46000 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: