diff options
Diffstat (limited to 'tests/libtest/lib1560.c')
-rw-r--r-- | tests/libtest/lib1560.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 8d7b4e966..3120a63ab 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -474,6 +474,12 @@ static const struct testcase get_parts_list[] ={ }; static const struct urltestcase get_url_list[] = { + {"https://0x7f.1", "https://127.0.0.1/", 0, 0, CURLUE_OK}, + {"https://1.2.3.256.com", "https://1.2.3.256.com/", 0, 0, CURLUE_OK}, + {"https://10.com", "https://10.com/", 0, 0, CURLUE_OK}, + {"https://1.2.com", "https://1.2.com/", 0, 0, CURLUE_OK}, + {"https://1.2.3.com", "https://1.2.3.com/", 0, 0, CURLUE_OK}, + {"https://1.2.com.99", "https://1.2.com.99/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://[fe80::0000:20c:29ff:fe9c:409b]:80/moo", "https://[fe80::20c:29ff:fe9c:409b]:80/moo", 0, 0, CURLUE_OK}, @@ -522,19 +528,22 @@ static const struct urltestcase get_url_list[] = { /* IPv4 trickeries */ {"https://16843009", "https://1.1.1.1/", 0, 0, CURLUE_OK}, - {"https://0x7f.1", "https://127.0.0.1/", 0, 0, CURLUE_OK}, {"https://0177.1", "https://127.0.0.1/", 0, 0, CURLUE_OK}, {"https://0111.02.0x3", "https://73.2.0.3/", 0, 0, CURLUE_OK}, + {"https://0111.02.0x3.", "https://73.2.0.3./", 0, 0, CURLUE_BAD_HOSTNAME}, + {"https://0111.02.030", "https://73.2.0.24/", 0, 0, CURLUE_OK}, + {"https://0111.02.030.", "https://73.2.0.24./", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://0xff.0xff.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK}, {"https://1.0xffffff", "https://1.255.255.255/", 0, 0, CURLUE_OK}, /* IPv4 numerical overflows or syntax errors will not normalize */ - {"https://a127.0.0.1", "https://a127.0.0.1/", 0, 0, CURLUE_OK}, + {"https://a127.0.0.1", "https://a127.0.0.1/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://\xff.127.0.0.1", "https://%FF.127.0.0.1/", 0, CURLU_URLENCODE, - CURLUE_OK}, + CURLUE_BAD_HOSTNAME}, {"https://127.-0.0.1", "https://127.-0.0.1/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://127.0. 1", "https://127.0.0.1/", 0, 0, CURLUE_MALFORMED_INPUT}, {"https://1.0x1000000", "https://1.0x1000000/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://1.2.3.256", "https://1.2.3.256/", 0, 0, CURLUE_BAD_HOSTNAME}, + {"https://1.2.3.256.", "https://1.2.3.256./", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://1.2.3.4.5", "https://1.2.3.4.5/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://1.2.0x100.3", "https://1.2.0x100.3/", 0, 0, CURLUE_BAD_HOSTNAME}, {"https://4294967296", "https://4294967296/", 0, 0, CURLUE_BAD_HOSTNAME}, |