From 4b997626b1182a8a7d974f2957b3ad8eaebd8817 Mon Sep 17 00:00:00 2001 From: Sergey Markelov Date: Mon, 27 Sep 2021 08:31:52 +0200 Subject: urlapi: support UNC paths in file: URLs on Windows - file://host.name/path/file.txt is a valid UNC path \\host.name\path\files.txt to a non-local file transformed into URI (RFC 8089 Appendix E.3) - UNC paths on other OSs must be smb: URLs Closes #7366 --- tests/data/test2080 | Bin 20673 -> 20675 bytes tests/libtest/lib1560.c | 4 ++++ 2 files changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/data/test2080 b/tests/data/test2080 index 9a337031d..9c8d538fc 100644 Binary files a/tests/data/test2080 and b/tests/data/test2080 differ diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 3d341ddb4..f7529592c 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -187,6 +187,10 @@ static const struct testcase get_parts_list[] ={ {"file:///C:\\programs\\foo", "file | [11] | [12] | [13] | [14] | [15] | C:\\programs\\foo | [16] | [17]", CURLU_DEFAULT_SCHEME, 0, CURLUE_OK}, + {"file://host.example.com/Share/path/to/file.txt", + "file | [11] | [12] | [13] | host.example.com | [15] | " + "//host.example.com/Share/path/to/file.txt | [16] | [17]", + CURLU_DEFAULT_SCHEME, 0, CURLUE_OK}, #endif {"https://example.com/color/#green?no-red", "https | [11] | [12] | [13] | example.com | [15] | /color/ | [16] | " -- cgit v1.2.1