curl/tests/data/test191
Daniel Stenberg 98d9dc7840 URL-parsing: consider ? a divider
The URL parser got a little stricter as it now considers a ? to be a
host name divider so that the slightly sloppier URLs work too. The
problem that made me do this change was the reported problem with an URL
like: www.example.com?email=name@example.com This form of URL is not
really a legal URL (due to the missing slash after the host name) but is
widely accepted by all major browsers and libcurl also already accepted
it, it was just the '@' letter that triggered the problem now.

The side-effect of this change is that now libcurl no longer accepts the
?  letter as part of user-name or password when given in the URL, which
it used to accept (and is tested in test 191). That letter is however
mentioned in RFC3986 to be required to be percent encoded since it is
used as a divider.

Bug: http://curl.haxx.se/bug/view.cgi?id=3090268
2010-10-19 20:20:06 +02:00

36 lines
437 B
Plaintext

<testcase>
# Server-side
<reply>
<data>
data in file
</data>
</reply>
# Client-side
<client>
<server>
ftp
</server>
<name>
FTP URL with ?-letters in username and password
</name>
<command>
"ftp://use%3fr:pass%3fword@%HOSTIP:%FTPPORT/191"
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol>
USER use?r
PASS pass?word
PWD
EPSV
TYPE I
SIZE 191
RETR 191
QUIT
</protocol>
</verify>
</testcase>