Commit 7f496d8c authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Changed some FTP tests to validate the format of the PORT and EPRT commands

sent by curl, if not the addresses themselves.
parent 048c74f2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6,6 +6,13 @@

                                  Changelog

Dan F (17 September 2007)
- Added hooks to the test suite to make it possible to test a curl running
  on a remote host.

- Changed some FTP tests to validate the format of the PORT and EPRT commands
  sent by curl, if not the addresses themselves.

Daniel S (15 September 2007)
- Michal Marek made libcurl automatically append ";type=<a|i>" when using HTTP
  proxies for FTP urls.
+4 −5
Original line number Diff line number Diff line
@@ -34,17 +34,16 @@ ftp
FTP dir list, PORT with specified IP
 </name>
 <command>
ftp://%HOSTIP:%FTPPORT/ -P %HOSTIP
ftp://%HOSTIP:%FTPPORT/ -P %CLIENTIP
</command>
</client>

# Verify data after the test has been "shot"
<verify>
# strip all kinds of PORT, EPRT and LPRT curl can do
# Strip all valid kinds of PORT and EPRT that curl can send
<strip>
^PORT 127,0,0,1,.*
^EPRT.*
^LPRT.*
^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
</strip>
<protocol>
USER anonymous
+6 −6
Original line number Diff line number Diff line
@@ -33,18 +33,18 @@ ftp://%HOSTIP:%FTPPORT/a/path/103 -P -

# Verify data after the test has been "shot"
<verify>
<strippart>
s/^LPRT.*[\r\n]*//
s/^EPRT.*[\r\n]*//
s/^(PORT 127,0,0,1,)([0-9,]+)/$1/
</strippart>
# Strip all valid kinds of PORT and EPRT that curl can send
<strip>
^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
</strip>
<protocol>
USER anonymous
PASS ftp@example.com
PWD
CWD a
CWD path
PORT 127,0,0,1,
PORT 127,0,0,1,0,0
TYPE I
SIZE 103
RETR 103
+3 −3
Original line number Diff line number Diff line
@@ -31,10 +31,10 @@ Moooooooooooo

# Verify data after the test has been "shot"
<verify>
# Strip all valid kinds of PORT and EPRT that curl can send
<strip>
^PORT .*
^EPRT .*
^LPRT .*
^PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3},\d{1,3}
^EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|\d{1,5}\|
</strip>
<protocol>
USER anonymous
+8 −6
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ ftp
FTP download, failed PORT
 </name>
 <command>
ftp://%HOSTIP:%FTPPORT/116 -P 127.0.0.1
ftp://%HOSTIP:%FTPPORT/116 -P 1.2.3.4
</command>
</client>

@@ -31,15 +31,17 @@ ftp://%HOSTIP:%FTPPORT/116 -P 127.0.0.1
<errorcode>
30
</errorcode>
<strip>
^PORT 127,0,0,1,.*
^EPRT .*
^LPRT .*
</strip>
# Strip the port number but leave the rest
<strippart>
s/^(PORT \d{1,3},\d{1,3},\d{1,3},\d{1,3},)\d{1,3},\d{1,3}/$1/
s/^(EPRT \|1\|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\|)\d{1,5}\|/$1/
</strippart>
<protocol>
USER anonymous
PASS ftp@example.com
PWD
EPRT |1|1.2.3.4|
PORT 1,2,3,4,
QUIT
</protocol>
</verify>
Loading