-
Notifications
You must be signed in to change notification settings - Fork 135
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
Full asset is downloaded in progressive playback with "chunked" transfer encoding #1257
Comments
This happens on wpe-2.38 so we're using libsoup3 and HTTP2 requests. According to google, Transfer-Encoding:chunked is deprecated when using HTTP2 as all of the requests are chunked by design. The server shouldn't be replying with a Transfer-Content header when using an HTTP2 connection. |
Mi previous comment is not valid because the request is HTTP 1.1 and not 2.0. |
I coded a patch to honor Content-Length when the Transfer-Encoding is chunked (so the WebKitWebSrc element has an idea of the actual length, considers that the content isn't "live" and can therefore unblock the seek and partial download features) and submitted it upstream for review as https://bugs.webkit.org/show_bug.cgi?id=266691 / WebKit/WebKit#22093. |
Thanks for the feedback, @magomez . Will that be done via an upstream issue to be created? Or is it something you are working on? |
@filipe-norte-red , The PR is in review, in the meantime you can also give a try: WebKit/WebKit@68c0a93 |
…hunked content encoding https://bugs.webkit.org/show_bug.cgi?id=266691 Reviewed by Xabier Rodriguez-Calvar. Currently, chunked content-encoding media content transfers are considered not to have a defined length and are treated as live videos (no seek available, the whole content is downloaded in a monolithic way). However, sometimes the web server specifies a content-length that, even if not mandatory, gives a hint about the total length. If that info was used, we could treat the download in a much more flexible way, downloading only the required pieces on demand, as the player needs them, and also enabling seek. See: WebPlatformForEmbedded/WPEWebKit#1257 This patch leverages the information supplied by the content-length header when content-encoding is set as chunked. * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::responseReceived): Set length with the right information when the circumstances are appropriate. Canonical link: https://commits.webkit.org/272355@main
…hunked content encoding https://bugs.webkit.org/show_bug.cgi?id=266691 Reviewed by Xabier Rodriguez-Calvar. Currently, chunked content-encoding media content transfers are considered not to have a defined length and are treated as live videos (no seek available, the whole content is downloaded in a monolithic way). However, sometimes the web server specifies a content-length that, even if not mandatory, gives a hint about the total length. If that info was used, we could treat the download in a much more flexible way, downloading only the required pieces on demand, as the player needs them, and also enabling seek. See: #1257 This patch leverages the information supplied by the content-length header when content-encoding is set as chunked. * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::responseReceived): Set length with the right information when the circumstances are appropriate. Canonical link: https://commits.webkit.org/272355@main
…hunked content encoding https://bugs.webkit.org/show_bug.cgi?id=266691 Reviewed by Xabier Rodriguez-Calvar. Currently, chunked content-encoding media content transfers are considered not to have a defined length and are treated as live videos (no seek available, the whole content is downloaded in a monolithic way). However, sometimes the web server specifies a content-length that, even if not mandatory, gives a hint about the total length. If that info was used, we could treat the download in a much more flexible way, downloading only the required pieces on demand, as the player needs them, and also enabling seek. See: #1257 This patch leverages the information supplied by the content-length header when content-encoding is set as chunked. * Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (CachedResourceStreamingClient::responseReceived): Set length with the right information when the circumstances are appropriate. Canonical link: https://commits.webkit.org/272355@main
The fix landed upstream as WebKit/WebKit@dc46983 and was backported to wpe-2.38 as b56a9c7 and to wpe-2.42 as 4e6f703. |
When a server transfers a video resource using "chunked" transfer encoding, wpe will download the full file, irrespective of size (e.g. 150MB). However, if "chunked" transfer encoding is not used, wpe will download small parts, progressively requesting further parts of the file as needed.
The attached test.zip contains:
Repo steps:
If you'd like to disable chunked transfer mode for test, edit myserver.js and comment line 20:
res.setHeader('Transfer-Encoding', 'chunked');
The text was updated successfully, but these errors were encountered: