Skip to content
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

[browser][http] mute JS exceptions about network errors + HEAD verb #113014

Merged
merged 19 commits into from
Mar 7, 2025

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Feb 28, 2025

  1. In browser HTTP client we subscribe for rejected promises in order to suppress unhandled rejection of AbortError when we issue the abort. The current handler also handles other network errors and aborts the whole program, which is not what it should do. Instead the network error should be propagated to managed HTTP client code.

  2. in Firefox when the verb is HEAD, the body is null. We should not fail because of that.

  3. Passing Response as result of http_wasm_fetch is creating JS memory leak by marshaling the object.

Contributes to #112172
Contributes to #111992

This bug fix should be back ported.

@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-System.Net.Http os-browser Browser variant of arch-wasm labels Feb 28, 2025
@pavelsavara pavelsavara added this to the 10.0.0 milestone Feb 28, 2025
@pavelsavara pavelsavara self-assigned this Feb 28, 2025
@pavelsavara pavelsavara requested a review from maraf February 28, 2025 13:35
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@pavelsavara pavelsavara changed the title [browser][http] mute JS exceptions about network errors [browser][http] mute JS exceptions about network errors + HEAD verb Feb 28, 2025
@pavelsavara pavelsavara marked this pull request as ready for review March 7, 2025 11:56
@pavelsavara pavelsavara requested a review from lewing as a code owner March 7, 2025 11:56
@pavelsavara pavelsavara requested a review from campersau March 7, 2025 11:57
…ver/Handlers/EchoHandler.cs

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Copy link
Contributor

@campersau campersau left a comment

Choose a reason for hiding this comment

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

Some nits

pavelsavara and others added 4 commits March 7, 2025 14:03
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
…ver/Handlers/EchoHandler.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: campersau <buchholz.bastian@googlemail.com>
@pavelsavara
Copy link
Member Author

/ba-g known CI issue #110805

@pavelsavara pavelsavara merged commit 3161a29 into dotnet:main Mar 7, 2025
91 of 93 checks passed
@pavelsavara pavelsavara deleted the browser_http_mute_abort branch March 7, 2025 16:51
@pavelsavara
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

github-actions bot commented Mar 7, 2025

Started backporting to release/9.0: https://github.com/dotnet/runtime/actions/runs/13725376350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-System.Net.Http os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants