Skip to content

Cover the HTTP/3 side of the header fix, and widen a test's margins - #948

Merged
benoitc merged 1 commit into
masterfrom
test/h3-headers-and-timing
Sep 24, 2026
Merged

benoitc merged 1 commit into
masterfrom
test/h3-headers-and-timing

Conversation

@benoitc

@benoitc benoitc commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Follow-up to #934 and #935, both merged as-is. Tests only, no behaviour change.

hackney_conn:normalize_headers/1 is shared by the HTTP/2 request path and all four HTTP/3 send paths, so #935 fixed HTTP/3 as well, where RFC 9114 4.2 bans the same fields RFC 9113 8.2.2 does. Only HTTP/2 was covered, so a later change narrowing that filter to HTTP/2 would have broken HTTP/3 without failing anything. hackney_http3_connection_headers_tests mirrors the three HTTP/2 cases; all three fail against the pre-#935 filter with {error, {invalid_field, <<"connection">>, <<>>}}.

The HTTP/3 test server had no way to show a test which headers reached it, so it answers GET /headers with them, one per line. Its route list also gains the /reset entry it was missing.

The checkout-idle tests from #934 probed within 100ms of a 300ms deadline. A stall before the probe closes the conn and fails the test for a reason unrelated to the bug it guards, which is a poor trade on the FreeBSD and macOS runners. The timer is 1s now, with the probe half a second clear of the deadline on either side; the assertions are untouched. The module takes about 4.5s instead of under a second.

Both modules ran 8 times clean, and 8 more with ERL_FLAGS="+S 1:1". Full suite: 1136 tests, xref and dialyzer clean.

normalize_headers/1 is shared by the HTTP/2 and HTTP/3 request paths, so
stripping the connection-specific headers of RFC 9113 8.2.2 fixed HTTP/3
too, where RFC 9114 4.2 bans the same fields. Only HTTP/2 was covered, so
narrowing that filter would have broken HTTP/3 quietly. The HTTP/3 test
server reports the headers it received on a new /headers route, and its
route list gains the /reset entry it was missing.

The checkout-idle tests probed within 100ms of a 300ms deadline, which is
thin for the FreeBSD and macOS runners. The timer is 1s now and the probe
sits half a second from either side of it. The assertions are unchanged.
@benoitc
benoitc merged commit 65cc092 into master Sep 24, 2026
6 checks passed
@benoitc
benoitc deleted the test/h3-headers-and-timing branch September 24, 2026 08:06
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