Skip to content

Commit efb3bfa

Browse files
committed
Merge PR 191, test_200_17+18: check remote.emitted count fix
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.
1 parent d03545c commit efb3bfa

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

mod_http2/h2_session.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,11 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
363363
else {
364364
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c1,
365365
H2_SSSN_LOG(APLOGNO(03066), session,
366-
"recv FRAME[%s], frames=%ld/%ld (r/s)"),
366+
"recv FRAME[%s], frames=%ld/%ld (r/s), "
367+
"remote.emitted=%d"),
367368
buffer, (long)session->frames_received,
368-
(long)session->frames_sent);
369+
(long)session->frames_sent,
370+
(int)session->remote.emitted_count);
369371
}
370372
}
371373

test/modules/http2/test_200_header_invalid.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ def test_h2_200_17(self, env):
246246
conf.add_vhost_cgi()
247247
conf.install()
248248
assert env.apache_restart() == 0
249-
re_emitted = re.compile(r'.* AH03401: .* shutdown, remote.emitted=1')
249+
re_emitted = re.compile(r'.* (AH03401: .* shutdown,|'
250+
r'AH03066: .* FRAME\[GOAWAY.*) remote.emitted=1')
250251
url = env.mkurl("https", "cgi", "/")
251252
opt = []
252253
for i in range(10):
@@ -266,7 +267,8 @@ def test_h2_200_18(self, env):
266267
conf.add_vhost_cgi()
267268
conf.install()
268269
assert env.apache_restart() == 0
269-
re_emitted = re.compile(r'.* AH03401: .* shutdown, remote.emitted=1')
270+
re_emitted = re.compile(r'.* (AH03401: .* shutdown,|'
271+
r'AH03066: .* FRAME\[GOAWAY.*) remote.emitted=1')
270272
url = env.mkurl("https", "cgi", "/")
271273
opt = []
272274
for i in range(100):

0 commit comments

Comments
 (0)