diff options
author | Jon DeVree <nuxi@vault24.org> | 2018-03-29 18:39:56 -0400 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-04-06 14:28:42 +0200 |
commit | 695e96b3d5b9e6ae4832af5f8e99e07de960bf33 (patch) | |
tree | 158acb1a397e204df443ba6239eaaecf65d41a93 /tests/data/test2072 | |
parent | 2536e2450b4b0364d83c315ad2ee01b67f514db0 (diff) |
file: restore old behavior for file:////foo/bar URLs
curl 7.57.0 and up interpret this according to Appendix E.3.2 of RFC
8089 but then returns an error saying this is unimplemented. This is
actually a regression in behavior on both Windows and Unix.
Before curl 7.57.0 this URL was treated as a path of "//foo/bar" and
then passed to the relevant OS API. This means that the behavior of this
case is actually OS dependent.
The Unix path resolution rules say that the OS must handle swallowing
the extra "/" and so this path is the same as "/foo/bar"
The Windows path resolution rules say that this is a UNC path and
automatically handles the SMB access for the program. So curl on Windows
was already doing Appendix E.3.2 without any special code in curl.
Regression
Closes #2438
Diffstat (limited to 'tests/data/test2072')
-rw-r--r-- | tests/data/test2072 | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/data/test2072 b/tests/data/test2072 index 2949c2502..0d2489ff1 100644 --- a/tests/data/test2072 +++ b/tests/data/test2072 @@ -6,6 +6,13 @@ FILE </info> <reply> +<data> +foo + bar +bar + foo +moo +</data> </reply> # Client-side @@ -14,12 +21,15 @@ FILE file </server> <name> -file:// with SMB path +file:// with unix path resolution behavior for the case of extra slashes </name> <command> -file:////bad-host%PWD/log/test1145.txt +file:////%PWD/log/test2072.txt </command> -<file name="log/test1145.txt"> +<precheck> +perl -e "print 'Test requires a unix system' if ( $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos');" +</precheck> +<file name="log/test2072.txt"> foo bar bar @@ -30,9 +40,5 @@ moo # Verify data after the test has been "shot" <verify> -# CURLE_URL_MALFORMAT is error code 3 -<errorcode> -3 -</errorcode> </verify> </testcase> |