Repository navigation
Conversation
Collaborator
|
Review requested:
|
inoway46
marked this pull request as ready for review
December 2, 2026 06:23
inoway46
force-pushed
the
http-fix-pipelined-header-order
branch
from
December 2, 2026 06:28
665a1c1 to
0f1e5dd
Compare
When the first body chunk was not a utf8 or latin1 string, the header was put at the front of the output queue. If a pipelined response was still waiting for its socket and an informational response such as 100 Continue had already been queued, the header was sent before it. Append the header with _writeRaw() instead, as is already the case for string chunks. This also removes the duplicated accounting of the pending output size. Signed-off-by: inoway46 <inoueyuya416@gmail.com> Assisted-by: Claude Code
inoway46
force-pushed
the
http-fix-pipelined-header-order
branch
from
December 2, 2026 07:10
0f1e5dd to
65d3924
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67959 +/- ##
==========================================
+ Coverage 90.57% 90.58% +0.01%
==========================================
Files 802 802
Lines 286674 286857 +183
Branches 55378 55400 +22
==========================================
+ Hits 259655 259853 +198
+ Misses 17125 17093 -32
- Partials 9894 9911 +17
🚀 New features to boost your workflow:
|
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.
When a pipelined response is waiting for its socket,
_send()can place the final response header ahead of a queued100 Continueif the first body chunk is aBuffer. Use_writeRaw()to preserve their order. The regression test checks string,Buffer, andUint8Arraybodies.Benchmark
http/simple.jsshowed no statistically significant throughput change for ordinary 1 KiB responses on an Apple M5 Pro (macOS arm64, autocannon 8.0.0).BufferWith
BASE_NODEandPR_NODEpointing to release builds of 408fdc5 and 65d3924, respectively, andautocannononPATH, run from the repository root: