-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JSRPC: Fix returning RPC stream as HTTP response body.
If, in an HTTP handler, you fetched a ReadableStream over RPC, and then used that ReadableStream as your HTTP response, the stream would be prematurely canceled. The problem is that the system thinks deferred proxying is possible, since we're pumping from a system stream. So, it shuts down the IoContext, thinking that no more JavaScript needs to run. However, the IoContext itself holds open the RPC context; canceling it breaks the stream. In the future we should solve this properly s othat deferred proxying is possible. For now, we simply block deferred proxying of RPC streams.
- Loading branch information
Showing
2 changed files
with
74 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters