Skip to content

Commit

Permalink
Merge PR 191, test_200_17+18: check remote.emitted count fix
Browse files Browse the repository at this point in the history
Newer curl versions send a GOAWAY frame rapidly after the response
is received, making the test_200_17+18 fail since the desired log
statement does not appear.

Add the log output where the GOAWAY is received and check for that
in the test cases in addition.

Thanks to Rainer Jung for tracking this down.
  • Loading branch information
icing committed Jan 17, 2025
1 parent d03545c commit efb3bfa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions mod_http2/h2_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,11 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
else {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c1,
H2_SSSN_LOG(APLOGNO(03066), session,
"recv FRAME[%s], frames=%ld/%ld (r/s)"),
"recv FRAME[%s], frames=%ld/%ld (r/s), "
"remote.emitted=%d"),
buffer, (long)session->frames_received,
(long)session->frames_sent);
(long)session->frames_sent,
(int)session->remote.emitted_count);
}
}

Expand Down
6 changes: 4 additions & 2 deletions test/modules/http2/test_200_header_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def test_h2_200_17(self, env):
conf.add_vhost_cgi()
conf.install()
assert env.apache_restart() == 0
re_emitted = re.compile(r'.* AH03401: .* shutdown, remote.emitted=1')
re_emitted = re.compile(r'.* (AH03401: .* shutdown,|'
r'AH03066: .* FRAME\[GOAWAY.*) remote.emitted=1')
url = env.mkurl("https", "cgi", "/")
opt = []
for i in range(10):
Expand All @@ -266,7 +267,8 @@ def test_h2_200_18(self, env):
conf.add_vhost_cgi()
conf.install()
assert env.apache_restart() == 0
re_emitted = re.compile(r'.* AH03401: .* shutdown, remote.emitted=1')
re_emitted = re.compile(r'.* (AH03401: .* shutdown,|'
r'AH03066: .* FRAME\[GOAWAY.*) remote.emitted=1')
url = env.mkurl("https", "cgi", "/")
opt = []
for i in range(100):
Expand Down

0 comments on commit efb3bfa

Please sign in to comment.