Skip to content

fix(core): correct asset protocol multi-range responses (fix: #15837) - #15838

Merged
amrbashir merged 3 commits into
tauri-apps:devfrom
lazerg:fix/issue-15837-asset-multirange
Sep 11, 2026
Merged

amrbashir merged 3 commits into
tauri-apps:devfrom
lazerg:fix/issue-15837-asset-multirange

Conversation

@lazerg

@lazerg lazerg commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Multi-range asset:// responses had three problems. The multipart body was terminated with an opening boundary (--boundary) instead of the close-delimiter RFC 2046 asks for (--boundary--). The sniffed file mime type set before the range branch stayed on the response alongside multipart/byteranges, because Builder::header appends rather than replaces, so clients reading the first Content-Type parsed the envelope as the file itself. And the status stayed 200 OK while the body was partial.

Single-range requests, which is what <video> and <audio> normally send, were never affected, so this only shows up on clients asking for more than one range. Added a unit test covering all three.

Closes #15837.

@lazerg
lazerg requested a review from a team as a code owner August 6, 2026 23:47
@lazerg lazerg changed the title fix(core): correct asset protocol multi-range responses fix(core): correct asset protocol multi-range responses (fix: #15837) Aug 7, 2026
@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Package Changes Through 5bf4f8e

There are 14 changes which include tauri-cli with minor, @tauri-apps/cli with minor, tauri with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lazerg

lazerg commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

Hey @Legend-Master, could you review this fix for the asset protocol's multi-range responses? It's been open a month.

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you. This LGTM, one small nit and could you also update examples/streaming/main.rs, it have the same issue.

Comment thread crates/tauri/src/protocol/asset.rs Resolved

@amrbashir amrbashir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you

@amrbashir

amrbashir commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

@lazerg you need to sign all your commits in this PR, otherwise I can't merge it. 94ad6e1 was not signed.

@lazerg
lazerg force-pushed the fix/issue-15837-asset-multirange branch from 94ad6e1 to 5bf4f8e Compare September 11, 2026 06:57
@lazerg

lazerg commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Done, re-signed all commits.

@amrbashir
amrbashir merged commit f9ed1a3 into tauri-apps:dev Sep 11, 2026
23 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.

[bug] asset protocol multi-range responses: missing close delimiter, duplicate Content-Type, and 200 instead of 206

2 participants