mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:23:34 +03:00
http/3: add shutdown support
- openssl-quic shutdown handling - ngtcp2 shutdown handling - quiche shutdown handling - add test_19_06 for verfication Reported-by: Dexter Gerig Closes #14027 Fixes #14022
This commit is contained in:
parent
868ae0673c
commit
bb09a304bb
4 changed files with 253 additions and 39 deletions
|
|
@ -153,4 +153,24 @@ class TestShutdown:
|
|||
removes = [l for l in r.trace_lines if re.match(r'.*socket cb: socket \d+ REMOVED', l)]
|
||||
assert len(removes) == count, f'{removes}'
|
||||
|
||||
# check graceful shutdown on multiplexed http
|
||||
@pytest.mark.parametrize("proto", ['h2', 'h3'])
|
||||
def test_19_06_check_shutdown(self, env: Env, httpd, nghttpx, repeat, proto):
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
if not env.curl_is_debug():
|
||||
pytest.skip('only works for curl debug builds')
|
||||
curl = CurlClient(env=env, run_env={
|
||||
'CURL_GRACEFUL_SHUTDOWN': '2000',
|
||||
'CURL_DEBUG': 'all'
|
||||
})
|
||||
url = f'https://{env.authority_for(env.domain1, proto)}/data.json?[0-1]'
|
||||
r = curl.http_download(urls=[url], alpn_proto=proto, with_tcpdump=True, extra_args=[
|
||||
'--parallel'
|
||||
])
|
||||
r.check_response(http_status=200, count=2)
|
||||
# check connection cache closings
|
||||
shutdowns = [l for l in r.trace_lines if re.match(r'.*CCACHE\] shutdown #\d+, done=1', l)]
|
||||
assert len(shutdowns) == 1, f'{shutdowns}'
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue