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] [wasm] Request Streaming upload #91295

Merged
merged 23 commits into from
Sep 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d94e62d
progress
campersau Aug 27, 2023
c52325d
progress try out byob
campersau Aug 28, 2023
a85a8c8
back to enqueue again
campersau Aug 28, 2023
ec46048
finalize request stream test
campersau Aug 28, 2023
d9e12ce
checkpoint
campersau Aug 29, 2023
5297b09
reject fetch with read stream exception
campersau Aug 29, 2023
df3b0c9
fix build
campersau Aug 30, 2023
cdfeab2
use createPromiseController in pull
campersau Aug 30, 2023
e2193e6
dispose controller
campersau Aug 30, 2023
92ae132
swap delegate allocation with state allocation
campersau Aug 30, 2023
487ef33
add response / request streaming test
campersau Aug 30, 2023
1ebb07d
use createPromiseController for fetch
campersau Aug 30, 2023
2fce6de
Revert "use createPromiseController for fetch"
campersau Aug 30, 2023
cd4957a
rename pull to pull_delegate
campersau Aug 30, 2023
a69fd0a
move reading into ReadableStreamPullState
campersau Aug 30, 2023
2da7d3d
pass HttpCompletionOption.ResponseHeadersRead in streaming test
campersau Aug 31, 2023
7648544
- don't pass controller to C#, only pass pull_state
pavelsavara Aug 31, 2023
dd83582
fix build by passing the correct length
campersau Aug 31, 2023
f91c045
feedback
pavelsavara Aug 31, 2023
f578966
type: "bytes" need be there
pavelsavara Aug 31, 2023
dad30c5
call ReadableStreamControllerEnqueueUnsafe again
campersau Aug 31, 2023
ee3a4a7
BrowserHttpHandler_Streaming not OuterLoop
pavelsavara Aug 31, 2023
a594c92
add comment for streaming request feature detection logic
campersau Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -359,18 +359,19 @@ public async Task PullAsync()
try
{
int length = await _stream.ReadAsync(_buffer, _cancellationToken).ConfigureAwait(true);
ReadableStreamControllerEnqueueUnsafe(this, _buffer, length);
pavelsavara marked this conversation as resolved.
Show resolved Hide resolved
}
catch (Exception ex)
{
BrowserHttpInterop.ReadableStreamControllerError(this, ex);
}
}

private unsafe void ReadableStreamControllerEnqueueUnsafe(object pullState, int length)
private static unsafe void ReadableStreamControllerEnqueueUnsafe(object pullState, byte[] buffer, int length)
{
fixed (byte* ptr = _buffer)
fixed (byte* ptr = buffer)
{
BrowserHttpInterop.ReadableStreamControllerEnqueue(this, (nint)ptr, length);
BrowserHttpInterop.ReadableStreamControllerEnqueue(pullState, (nint)ptr, length);
}
}
}
Expand Down