Skip to content

fix(Android): range requests - #8190

Closed
bolivir wants to merge 1 commit into
ionic-team:mainfrom
bolivir:patch-1
Closed

bolivir wants to merge 1 commit into
ionic-team:mainfrom
bolivir:patch-1

Conversation

@bolivir

@bolivir bolivir commented Oct 22, 2025 •

Copy link
Copy Markdown

The responseHeaders map is shared between threads, causing simultaneous requests to return the same Content-Length to the browser in case of range requests. See the illustration in ionic-team/cordova-plugin-ionic-webview#453 (the same issue is present Capacitor).

This PR proposes to return a copy of the map on each invocation. Based on #5956

Return a new HashMap instance of responseHeaders to prevent external modifications.
@bolivir bolivir changed the title Android range requests fix(Android): range requests Oct 22, 2025
@bolivir bolivir mentioned this pull request Oct 22, 2025
@JeroenBoesten

Copy link
Copy Markdown

Would love to see this merged this should also fix #6021.

@eric-horodyski

Copy link
Copy Markdown
Member

Thanks for opening this PR 🙏

As part of our backlog maintenance effort, we’re reviewing older pull requests for compatibility with the current branch structure and latest releases.

Details: https://ionic.io/blog/keeping-capacitors-backlog-healthy

This PR will need to be rebased against the latest main branch and updated to resolve merge conflicts.

If we don’t see updates within 7 days, we’ll close it to keep the queue focused — but it can always be resubmitted once updated.

@OS-pedrogustavobilro

Copy link
Copy Markdown
Contributor

Hey @bolivir, we've just merged this more recent PR #8357 that does a similar fix to yours - So we'll actually be closing this one.

Feel free to ask questions if you have any, and we do appreciate your contribution nonetheless!

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.

4 participants