From b0b2824b58df4dead3fdc7fcb48c3c95328ae2fc Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 24 Aug 2009 12:57:25 +0000 Subject: - Introduced a SYST-based test to properly set-up name format when dealing with the OS/400 FTP server. - Fixed an ftp_readresp() bug preventing detection of failing control socket and causing FTP client to loop forever. --- tests/data/Makefile.am | 2 +- tests/data/test1102 | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1103 | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1102 create mode 100644 tests/data/test1103 (limited to 'tests') diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 72afc5128..8e5b4c727 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -62,7 +62,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \ test635 test636 test637 test558 test559 test1086 test1087 test1088 \ test1089 test1090 test1091 test1092 test1093 test1094 test1095 test1096 \ test1097 test560 test561 test1098 test1099 test562 test563 test1100 \ - test564 test1101 + test564 test1101 test1102 test1103 filecheck: @mkdir test-place; \ diff --git a/tests/data/test1102 b/tests/data/test1102 new file mode 100644 index 000000000..addc7b572 --- /dev/null +++ b/tests/data/test1102 @@ -0,0 +1,51 @@ + + + +FTP +SYST +SITE +OS400 + + +# Server-side + + +blabla + + +REPLY PWD 257 "QGPL" is the current library +REPLY SYST 215 OS/400 runs this server +REPLY SITE 250 Name format set to 1 + + + +# Client-side + + +ftp + + +FTP OS/400 server name format check + + +ftp://%HOSTIP:%FTPPORT/1102 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +SYST +SITE NAMEFMT 1 +PWD +EPSV +TYPE I +SIZE 1102 +RETR 1102 +QUIT + + + diff --git a/tests/data/test1103 b/tests/data/test1103 new file mode 100644 index 000000000..4d45056d5 --- /dev/null +++ b/tests/data/test1103 @@ -0,0 +1,48 @@ + + + +FTP +SYST +SITE +OS400 + + +# Server-side + + +blabla + + +REPLY PWD 257 "C:/somedir" is the current directory +REPLY SYST 215 unknown-OS runs this server + + + +# Client-side + + +ftp + + +FTP non-OS/400 server + + +ftp://%HOSTIP:%FTPPORT/1103 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +SYST +EPSV +TYPE I +SIZE 1103 +RETR 1103 +QUIT + + + -- cgit v1.2.3