mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
parent
7a14898264
commit
bdb7d8b004
43 changed files with 70 additions and 67 deletions
|
|
@ -23,7 +23,7 @@ swsclose
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET with a invalid HTTP/1 response line start
|
||||
HTTP GET with an invalid HTTP/1 response line start
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http0.9
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ h2c
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP/1 doing HTTP/2 Upgrade: getting a HTTP/2 101 response
|
||||
HTTP/1 doing HTTP/2 Upgrade: getting an HTTP/2 101 response
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER --http2
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ ftp
|
|||
proxy
|
||||
</features>
|
||||
<name>
|
||||
HTTP PUT to a FTP URL with username+password - over HTTP proxy
|
||||
HTTP PUT to an FTP URL with username+password - over HTTP proxy
|
||||
</name>
|
||||
<command>
|
||||
-x http://%HOSTIP:%HTTPPORT ftp://daniel:mysecret@host.com/we/want/%TESTNUMBER -T %LOGDIR/test%TESTNUMBER.txt
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ def parse_size(s):
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(prog='scorecard', description="""
|
||||
Run a range of tests to give a scorecard for a HTTP protocol
|
||||
Run a range of tests to give a scorecard for an HTTP protocol
|
||||
'h3' or 'h2' implementation in curl.
|
||||
""")
|
||||
parser.add_argument("-v", "--verbose", action='count', default=1,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class TestReuse:
|
|||
|
||||
@pytest.mark.skipif(condition=not Env.have_h3(), reason="h3 not supported")
|
||||
def test_12_03_as_follow_h2h3(self, env: Env, httpd, configures_httpd, nghttpx):
|
||||
# write a alt-svc file that advises h3 instead of h2
|
||||
# write an alt-svc file that advises h3 instead of h2
|
||||
asfile = os.path.join(env.gen_dir, 'alt-svc-12_03.txt')
|
||||
self.create_asfile(asfile, f'h2 {env.domain1} {env.https_port} h3 {env.domain1} {env.h3_port}')
|
||||
curl = CurlClient(env=env)
|
||||
|
|
@ -91,7 +91,7 @@ class TestReuse:
|
|||
@pytest.mark.skipif(condition=not Env.have_h3(), reason="h3 not supported")
|
||||
def test_12_04_as_follow_h3h2(self, env: Env, httpd, configures_httpd, nghttpx):
|
||||
count = 2
|
||||
# write a alt-svc file the advises h2 instead of h3
|
||||
# write an alt-svc file the advises h2 instead of h3
|
||||
asfile = os.path.join(env.gen_dir, 'alt-svc-12_04.txt')
|
||||
ts = datetime.now() + timedelta(hours=24)
|
||||
expires = f'{ts.year:04}{ts.month:02}{ts.day:02} {ts.hour:02}:{ts.minute:02}:{ts.second:02}'
|
||||
|
|
@ -113,7 +113,7 @@ class TestReuse:
|
|||
def test_12_05_as_follow_h3h1(self, env: Env, httpd, configures_httpd, nghttpx):
|
||||
# With '--http3` an Alt-Svc redirection from h3 to h1 is allowed
|
||||
count = 2
|
||||
# write a alt-svc file the advises h1 instead of h3
|
||||
# write an alt-svc file the advises h1 instead of h3
|
||||
asfile = os.path.join(env.gen_dir, 'alt-svc-12_05.txt')
|
||||
ts = datetime.now() + timedelta(hours=24)
|
||||
expires = f'{ts.year:04}{ts.month:02}{ts.day:02} {ts.hour:02}:{ts.minute:02}:{ts.second:02}'
|
||||
|
|
@ -135,7 +135,7 @@ class TestReuse:
|
|||
def test_12_06_as_ignore_h3h1(self, env: Env, httpd, configures_httpd, nghttpx):
|
||||
# With '--http3-only` an Alt-Svc redirection from h3 to h1 is ignored
|
||||
count = 2
|
||||
# write a alt-svc file the advises h1 instead of h3
|
||||
# write an alt-svc file the advises h1 instead of h3
|
||||
asfile = os.path.join(env.gen_dir, 'alt-svc-12_05.txt')
|
||||
ts = datetime.now() + timedelta(hours=24)
|
||||
expires = f'{ts.year:04}{ts.month:02}{ts.day:02} {ts.hour:02}:{ts.minute:02}:{ts.second:02}'
|
||||
|
|
@ -156,7 +156,7 @@ class TestReuse:
|
|||
@pytest.mark.skipif(condition=not Env.have_h3(), reason="h3 not supported")
|
||||
def test_12_07_as_ignore_h2h3(self, env: Env, httpd, configures_httpd, nghttpx):
|
||||
# With '--http2` an Alt-Svc redirection from h2 to h3 is ignored
|
||||
# write a alt-svc file that advises h3 instead of h2
|
||||
# write an alt-svc file that advises h3 instead of h2
|
||||
asfile = os.path.join(env.gen_dir, 'alt-svc-12_03.txt')
|
||||
self.create_asfile(asfile, f'h2 {env.domain1} {env.https_port} h3 {env.domain1} {env.h3_port}')
|
||||
curl = CurlClient(env=env)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* HTTP1 amd HTTP2 (no multiplexing) two transfers (expected two descriptors),
|
||||
* HTTP2 with multiplexing (expected one descriptors)
|
||||
* Improper inputs to the API result in CURLM_BAD_FUNCTION_ARGUMENT.
|
||||
* Sending a empty ufds, and size = 0 will return the number of fds needed.
|
||||
* Sending an empty ufds, and size = 0 will return the number of fds needed.
|
||||
* Sending a non-empty ufds, but smaller than the fds needed will result in a
|
||||
* CURLM_OUT_OF_MEMORY, and a number of fds that is >= to the number needed.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ static int test_rlimit(int keep_open)
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* using a FD_SETSIZE bound select() */
|
||||
#endif /* using an FD_SETSIZE bound select() */
|
||||
|
||||
/*
|
||||
* Old or 'backwards compatible' implementations of stdio do not allow
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ static int test_rlimit(int keep_open)
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* using a FD_SETSIZE bound select() */
|
||||
#endif /* using an FD_SETSIZE bound select() */
|
||||
|
||||
/*
|
||||
* Old or 'backwards compatible' implementations of stdio do not allow
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ static const struct testit headers[] = {
|
|||
{ "2.example.com", NULL,
|
||||
"max-age=\"21536000\"; includeSubDomains; includeSubDomains;",
|
||||
CURLE_BAD_FUNCTION_ARGUMENT },
|
||||
/* use a unknown directive "include" that should be ignored */
|
||||
/* use an unknown directive "include" that should be ignored */
|
||||
{ "3.example.com", NULL, "max-age=\"21536000\"; include; includeSubDomains;",
|
||||
CURLE_OK },
|
||||
/* remove the "3.example.com" one, should still match the example.com */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue