diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-09-24 14:45:27 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-09-24 23:30:43 +0200 |
commit | 6e7733f7884e82e486971260f078f6cbcbeac552 (patch) | |
tree | 4539b5d16a912bbefd1a3f277feb378c4a5b9b9f /tests | |
parent | 9e78e739a5a8dc7f8a35f10e9c0ada7b6df5a527 (diff) | |
download | curl-6e7733f7884e82e486971260f078f6cbcbeac552.tar.gz |
urlapi: question mark within fragment is still fragment
The parser would check for a query part before fragment, which caused it
to do wrong when the fragment contains a question mark.
Extended test 1560 to verify.
Reported-by: Alex Konev
Fixes #4412
Closes #4413
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libtest/lib1560.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index d161423e3..7f8accc7d 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -140,6 +140,26 @@ static struct testcase get_parts_list[] ={ "file | [11] | [12] | [13] | [14] | [15] | C:\\programs\\foo | [16] | [17]", CURLU_DEFAULT_SCHEME, 0, CURLUE_OK}, #endif + {"https://example.com/color/#green?no-black", + "https | [11] | [12] | [13] | example.com | [15] | /color/ | [16] | " + "green?no-black", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK }, + {"https://example.com/color/#green#no-black", + "https | [11] | [12] | [13] | example.com | [15] | /color/ | [16] | " + "green#no-black", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK }, + {"https://example.com/color/?green#no-black", + "https | [11] | [12] | [13] | example.com | [15] | /color/ | green | " + "no-black", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK }, + {"https://example.com/#color/?green#no-black", + "https | [11] | [12] | [13] | example.com | [15] | / | [16] | " + "color/?green#no-black", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK }, + {"https://example.#com/color/?green#no-black", + "https | [11] | [12] | [13] | example. | [15] | / | [16] | " + "com/color/?green#no-black", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK }, {"http://[ab.be:1]/x", "", CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT}, {"http://[ab.be]/x", "", |