Skip to content

Write HTTP/2 BytesBody responses directly#1272

Merged
quinnj merged 5 commits into
masterfrom
codex/h2-response-memory-1271
Jun 2, 2026
Merged

Write HTTP/2 BytesBody responses directly#1272
quinnj merged 5 commits into
masterfrom
codex/h2-response-memory-1271

Conversation

@quinnj
Copy link
Copy Markdown
Member

@quinnj quinnj commented Jun 2, 2026

Summary

  • fast-path HTTP/2 server responses backed by BytesBody by writing unread backing bytes directly
  • close BytesBody responses in a finally, preserving the streaming-body cleanup behavior
  • add HTTP/2 server coverage for a partially consumed BytesBody response

Notes

This hardens the path implicated by #1271. I could not reproduce the reported linear growth locally on macOS/aarch64 or native Linux/arm64, but this removes the per-read streaming-body chunk path for buffered BytesBody responses while preserving cursor/close semantics.

Verification

  • julia --project=. test/http2_server_tests.jl
  • local 24k-request H2 repro in BytesBody mode stayed flat
  • Docker native Linux/arm64 24k-request H2 repro in BytesBody mode stayed flat

Co-authored by Codex

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.93%. Comparing base (b93ad95) to head (2407cb2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1272      +/-   ##
==========================================
+ Coverage   84.51%   84.93%   +0.41%     
==========================================
  Files          28       28              
  Lines       10696    10711      +15     
==========================================
+ Hits         9040     9097      +57     
+ Misses       1656     1614      -42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quinnj quinnj merged commit 62e7d69 into master Jun 2, 2026
8 checks passed
@quinnj quinnj deleted the codex/h2-response-memory-1271 branch June 2, 2026 17:43
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.

1 participant