Repository navigation
Conversation
… with more no longer silently loses the rest The shim packed fields into a fixed array, stopped when it was full and returned what it had as if that were everything. The array is the connection's now and grows as needed. Fixes #506.
This branch has not been deployed
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.
What was wrong
ih3_unpack_headersfilled a fixednghttp3_nv nva[64], stopped when it was full, and returned what it had as if that were everything. A response past 64 fields,:statusincluded, lost the rest with no error and nothing logged: of 70 headers, the client got 63.The test client goes through the same function, so its requests were cut at 64 fields too.
Details are in #506.
The fix
The array belongs to the connection now, and grows as needed.
ih3_unpack_headersfills it in one pass, nghttp3 copies out of it during the submit, andih3_freefrees it. A message within the first 64 fields costs nothing new but onemallocper connection.Native libraries
runtimes/linux-x64andruntimes/linux-arm64are rebuilt withscripts/build-nghttp3-native.shat its pinned nghttp3 ref: x64 on the host, arm64 with theaarch64-linux-gnucross toolchain in an Ubuntu 24.04 container. Both still need nothing past GLIBC 2.17.Main's x64 library was built with another work directory, which nghttp3's assert strings embed. So besides this change the binary's diff has those paths, and a rebuild with the script's default now reproduces it.
Behaviour
A response past 64 fields now reaches the peer whole, on both the buffered and streamed paths.
API
None.
Tests
New in the E2E suite (
Nghttp3ManyFieldsTests.cs), through the bare HTTP/3 test client:nghttp3: a buffered response with 63 headers of its own reaches the peer whole, and with 64 and 200nghttp3: a streamed response with 63 headers of its own reaches the peer whole, and with 64 and 200nghttp3: a request past 64 fields reaches its handler wholeAgainst main's library (the tests only):
With the fix:
Bench
Measured with the same setup as #486:
h2load -c 32 -m 16 -t 1 --alpn-list=h3pinned to CPU 2.Http3/Nghttp3BufferedThe same as the control. A connection gains one
mallocof 2.5 KiB, at its first message.Fixes #506.