]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib1560: verify setting host to "" with and without URL encode
authorDaniel Stenberg <daniel@haxx.se>
Tue, 31 Oct 2023 10:35:25 +0000 (11:35 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 1 Nov 2023 09:55:55 +0000 (10:55 +0100)
tests/libtest/lib1560.c

index 765df0a279a905b7d8eae32814b47a0cf7cd1e88..218f43e22580f6f69984723faeb3ae7907f2523b 100644 (file)
@@ -785,6 +785,14 @@ static const struct setgetcase setget_parts_list[] = {
 
 /* !checksrc! disable SPACEBEFORECOMMA 1 */
 static const struct setcase set_parts_list[] = {
+  {"https://example.com/",
+   "host=\"\",",
+   "https://example.com/",
+   0, CURLU_URLENCODE, CURLUE_OK, CURLUE_BAD_HOSTNAME},
+  {"https://example.com/",
+   "host=\"\",",
+   "https://example.com/",
+   0, 0, CURLUE_OK, CURLUE_BAD_HOSTNAME},
   {"https://example.com",
    "path=get,",
    "https://example.com/get",