Skip to content

fix(http): fix aborting a streaming response#2562

Merged
FabianLars merged 5 commits intov2from
fix/http/abort-stream-response
Nov 24, 2025
Merged

fix(http): fix aborting a streaming response#2562
FabianLars merged 5 commits intov2from
fix/http/abort-stream-response

Conversation

@amrbashir
Copy link
Copy Markdown
Member

closes #2557

@amrbashir amrbashir requested a review from a team as a code owner March 22, 2025 08:06
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 22, 2025

Package Changes Through 30499bb

There are 4 changes which include http with patch, http-js with patch, updater with minor, updater-js 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
api-example 2.0.38 2.0.39
api-example-js 2.0.34 2.0.35
http 2.5.4 2.5.5
http-js 2.5.4 2.5.5
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.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

@amrbashir amrbashir requested a review from FabianLars November 3, 2025 00:51
Copy link
Copy Markdown
Member

@FabianLars FabianLars left a comment

Choose a reason for hiding this comment

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

I also only really tested this #2557 (comment)

Comment on lines +424 to +430
// SAFETY: we can access the inner value mutably
// because we are the only ones with a reference to it
// and we don't want to use `Arc::into_inner` because we want to keep the value in the table
// for potential future calls to `fetch_cancel_body`
let res_ptr = Arc::as_ptr(&res) as *mut ReqwestResponse;
let res = unsafe { &mut *res_ptr };
let res = &mut res.0;
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.

this still sounds pretty risky to me

@FabianLars FabianLars merged commit e8915f1 into v2 Nov 24, 2025
23 checks passed
@FabianLars FabianLars deleted the fix/http/abort-stream-response branch November 24, 2025 12:55
@BTMuli

This comment was marked as resolved.

@BTMuli
Copy link
Copy Markdown

BTMuli commented Nov 28, 2025

It's my mistake,to adapt this pr,specify the frontend JS API is neeed:

"@tauri-apps/plugin-http": "github:tauri-apps/tauri-plugin-http",

without above and simply set below will broken😢

[dependencies.tauri-plugin-http]
git = "ssh://git@github.com/tauri-apps/plugins-workspace.git"
branch = "v2"

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.

HTTP: cancelling request not working for streaming

4 participants