Repository navigation
fix(sandbox): deliver a queued HTTP rejection when the upload fails - #5339
Closed
rafamolina1 wants to merge 1 commit into
Closed
rafamolina1 wants to merge 1 commit into
rafamolina1 wants to merge 1 commit into
Conversation
copy_bidirectional returns the upload's BrokenPipe and abandons the reverse copy, so a middleware rejection the proxy has already written never reaches the sandbox. Curl then reports an empty reply even though the request stayed blocked. Copy the two directions in the same task. A clean EOF still half-closes that direction. An upload failure stops reading the body and allows one second for the queued response to flush. A response failure returns immediately and does not drain the unread upload. Signed-off-by: Rafael Molina <128931481+rafamolina1@users.noreply.github.com>
|
Thank you for your interest in contributing to OpenShell, @rafamolina1. This project uses a vouch system for first-time contributors. Before submitting a pull request, you need to be vouched by a maintainer. To get vouched:
See CONTRIBUTING.md for details. |
|
All contributors have signed the DCO ✍️ ✅ |
Author
|
I have read the DCO document and I hereby sign the DCO. |
1 similar comment
Author
|
I have read the DCO document and I hereby sign the DCO. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An oversized upload that the middleware rejects still left curl with an empty reply. The proxy had already written the HTTP rejection, but
copy_bidirectionalreturned the upload'sBrokenPipeand dropped that queued response. The request stayed blocked; only the response was lost.Related Issue
Closes #5132
Changes
RelayReadyrelay incomplete_network_openwith a same-task copy of both directions.complete_network_openpath: queued rejection with an unread body, traffic in both directions, half-close, an idle pair, and a response error.Release Notes
A sandbox upload rejected before it is forwarded now receives the HTTP rejection the supervisor already prepared, instead of an empty reply.
Testing
cargo fmt --all -- --check, the SPDX header check on the touched files, andcargo clippy --locked -p openshell-sandbox-backend --all-targets -- -D warningspass.cargo test -p openshell-sandbox-backend network_relaypasses all five relay tests. The Nomos curl lab from the issue was not run.Checklist