aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1560.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-01-27 17:28:40 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-01-28 08:40:16 +0100
commitd3dc0a07e9bd11afaac026802a9701f0796de780 (patch)
treed62b8e2b8bbdfffa1fead7eb16e8537d941f1a21 /tests/libtest/lib1560.c
parent0b030a5b232bd9fc4fed90f0d1aaac69c189aa22 (diff)
urlapi: guess scheme correct even with credentials given
In the "scheme-less" parsing case, we need to strip off credentials first before we guess scheme based on the host name! Assisted-by: Jay Satiro Fixes #4856 Closes #4857
Diffstat (limited to 'tests/libtest/lib1560.c')
-rw-r--r--tests/libtest/lib1560.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c
index 7f8accc7d..6228a137b 100644
--- a/tests/libtest/lib1560.c
+++ b/tests/libtest/lib1560.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -129,6 +129,14 @@ struct querycase {
};
static struct testcase get_parts_list[] ={
+ {"user:moo@ftp.example.com/color/#green?no-black",
+ "ftp | user | moo | [13] | ftp.example.com | [15] | /color/ | [16] | "
+ "green?no-black",
+ CURLU_GUESS_SCHEME, 0, CURLUE_OK },
+ {"ftp.user:moo@example.com/color/#green?no-black",
+ "http | ftp.user | moo | [13] | example.com | [15] | /color/ | [16] | "
+ "green?no-black",
+ CURLU_GUESS_SCHEME, 0, CURLUE_OK },
#ifdef WIN32
{"file:/C:\\programs\\foo",
"file | [11] | [12] | [13] | [14] | [15] | C:\\programs\\foo | [16] | [17]",