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

fix: properly stream uploadData in protocol.handle() #41358

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Feb 16, 2024

Backport of #41052

See that PR for details.

Notes: Fix various bugs which could prevent forwarding requests intercepted with protocol.handle().

trop bot and others added 6 commits February 16, 2024 19:29
Increase readability by moving the file stream creation logic out of the
`uploadData` to request body conversion function.

Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
Refs: #39658

Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
Refs: #40754

Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
Refs: #38929

Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
Refs: #40826

Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
Co-authored-by: Henrik S. Gaßmann <BurningEnlightenment@users.noreply.github.com>
@trop trop bot added 28-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Feb 16, 2024
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

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

Type error here:

electron/spec/api-protocol-spec.ts(1654,50): error TS2345: Argument of type 'ReadableStream<Uint8Array>' is not assignable to parameter of type 'Readable | AsyncIterator<any, any, undefined> | ReadableStream'.
  Type 'ReadableStream<Uint8Array>' is missing the following properties from type 'ReadableStream': readable, read, setEncoding, pause, and 21 more.

@zcbenz zcbenz added the wip ⚒ label Feb 28, 2024
@codebytere codebytere closed this Mar 25, 2024
@trop trop bot deleted the trop/28-x-y-bp-fix-properly-stream-uploaddata-in-protocol-handle--1708111781282 branch March 25, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
28-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes wip ⚒
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants