Skip to content

Prevent truncated responses through managed port-forwarding sockets - #338875

Merged
Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-err-content-length-mismatch
Oct 15, 2026
Merged

Alex Ross (alexr00) merged 3 commits into
mainfrom
copilot/fix-err-content-length-mismatch

Conversation

Copilot AI commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Large HTTP responses forwarded from devcontainers in WSL can truncate with ERR_CONTENT_LENGTH_MISMATCH. The managed socket bridge destroys the browser-facing socket on remote close, discarding queued writes.

  • Shutdown: Replace destroy() with end() so buffered bytes flush, matching the raw NodeSocket bridge.
  • Regression coverage: Verify complete delivery of a 16 MiB response under backpressure for end-only, close-only, and end-then-close notifications.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix net::ERR_CONTENT_LENGTH_MISMATCH issue when port-forwarding Prevent truncated responses through managed port-forwarding sockets Sep 30, 2026
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review October 15, 2026 11:01
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) October 15, 2026 11:01
@alexr00
Alex Ross (alexr00) merged commit 6bb4ac7 into main Oct 15, 2026
54 of 56 checks passed
@alexr00
Alex Ross (alexr00) deleted the copilot/fix-err-content-length-mismatch branch October 15, 2026 15:48
@vs-code-engineering vs-code-engineering Bot added this to the 1.143.0 milestone Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net::ERR_CONTENT_LENGTH_MISMATCH returning large content when port-forwarding from devcontainer how can i solve it?

4 participants