Skip to content

Test coverage for logging http2 header limit violations once (#666) - #765

Closed
notroj wants to merge 2 commits into
apache:trunkfrom
notroj:pr666-testing
Closed

notroj wants to merge 2 commits into
apache:trunkfrom
notroj:pr666-testing

Conversation

@notroj

@notroj notroj commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Adds test/modules/http2/test_111_header_limit_log.py covering the fix in #666, together with that PR's commit so the new case has something to run against. The test sets LimitRequestFields 5 and LogLevel http2:info, sends one HTTP/2 request carrying 25 extra headers, and asserts that AH10181 appears in the error log exactly once. Without #666 it appears 23 times; with it, once.

The guard that stopped working is worth spelling out, since #666 only says the earlier fix no longer does. h2_stream_add_header() gated its log calls on !h2_stream_is_ready(stream), but set_error_response() now only records a status on rtmp and never sets stream->response, which is what h2_stream_is_ready() tests. While request headers are still arriving neither that nor a response bucket exists, so the guard is always false.

One observation from writing the test: of the four call sites #666 touches, AH10180 already carried && !stream->request_headers_failed and so never flooded — the change there just drops the redundant is_ready half. A first attempt at a reproducer aimed at that site, with oversized headers rather than too many of them, passes on trunk unchanged. The flood is at the other three sites, and AH10181 is the one reachable from a plain request.

🤖 Generated with Claude Code

notroj and others added 2 commits September 17, 2026 19:04
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub: PR apache#666
The previous fix in icing/mod_h2#181 does not work
anymore.

(cherry picked from commit ff3dd26)
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.

2 participants