1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-14 05:25:06 -05:00
curl/tests/data/test2072
Jon DeVree 695e96b3d5
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
2018-04-06 14:28:42 +02:00

45 lines
581 B
Plaintext

<testcase>
<info>
<keywords>
FILE
</keywords>
</info>
<reply>
<data>
foo
bar
bar
foo
moo
</data>
</reply>
# Client-side
<client>
<server>
file
</server>
<name>
file:// with unix path resolution behavior for the case of extra slashes
</name>
<command>
file:////%PWD/log/test2072.txt
</command>
<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
foo
moo
</file>
</client>
# Verify data after the test has been "shot"
<verify>
</verify>
</testcase>