mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:33:36 +03:00
request: paused upload on completed download, assess connection
A transfer with a completed download that is still uploading needs to check the connection state when it is PAUSEd, since connection close/errors would otherwise go unnoticed. Reported-by: Sergey Bronnikov Fixes #13260 Closes #13271
This commit is contained in:
parent
d5e83eb745
commit
cfc65fd1ee
7 changed files with 321 additions and 8 deletions
|
|
@ -31,7 +31,7 @@ import os
|
|||
import time
|
||||
import pytest
|
||||
|
||||
from testenv import Env, CurlClient
|
||||
from testenv import Env, CurlClient, LocalClient
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -464,6 +464,21 @@ class TestUpload:
|
|||
n=1))
|
||||
assert False, f'download {dfile} differs:\n{diff}'
|
||||
|
||||
# upload large data, let connection die while doing it
|
||||
# issues #11769 #13260
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
def test_07_42_upload_disconnect(self, env: Env, httpd, nghttpx, repeat, proto):
|
||||
if proto == 'h3' and not env.have_h3():
|
||||
pytest.skip("h3 not supported")
|
||||
if proto == 'h3' and env.curl_uses_lib('msh3'):
|
||||
pytest.skip("msh3 fails here")
|
||||
client = LocalClient(name='upload-pausing', env=env, timeout=60)
|
||||
if not client.exists():
|
||||
pytest.skip(f'example client not built: {client.name}')
|
||||
url = f'http://{env.domain1}:{env.http_port}/curltest/echo?id=[0-0]&die_after=10'
|
||||
r = client.run([url])
|
||||
r.check_exit_code(18) # PARTIAL_FILE
|
||||
|
||||
# speed limited on put handler
|
||||
@pytest.mark.parametrize("proto", ['http/1.1', 'h2', 'h3'])
|
||||
def test_07_50_put_speed_limit(self, env: Env, httpd, nghttpx, proto, repeat):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue