From 04a6f0a1a4e6e22dbedd3db4920ea2f77bd5da11 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 4 Jun 2012 20:58:46 +0200 Subject: tests 1356 to 1363: several -O -J -i -D combinations with FTP protocol Currently 1356 to 1362 succeed but a write failure is logged in traceNNNN. Currently 1363 fails, so disabled for now. --- tests/data/DISABLED | 1 + tests/data/Makefile.am | 3 +- tests/data/test1356 | 82 ++++++++++++++++++++++++++++++++++++++++ tests/data/test1357 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1358 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1359 | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1360 | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1361 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1362 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ tests/data/test1363 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 780 insertions(+), 1 deletion(-) create mode 100644 tests/data/test1356 create mode 100644 tests/data/test1357 create mode 100644 tests/data/test1358 create mode 100644 tests/data/test1359 create mode 100644 tests/data/test1360 create mode 100644 tests/data/test1361 create mode 100644 tests/data/test1362 create mode 100644 tests/data/test1363 (limited to 'tests') diff --git a/tests/data/DISABLED b/tests/data/DISABLED index 310f3e9d2..52e318556 100644 --- a/tests/data/DISABLED +++ b/tests/data/DISABLED @@ -6,3 +6,4 @@ 1209 1211 1355 +1363 diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 44fcb3f6e..e48a16812 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -86,7 +86,8 @@ test1322 test1323 test1324 test1325 test1326 test1327 test1328 test1329 \ test1331 test1332 test1333 test1334 test1335 test1336 test1337 test1338 \ test1339 test1340 test1341 test1342 test1343 test1344 test1345 test1346 \ test1347 test1348 test1349 test1350 test1351 test1352 test1353 test1354 \ -test1355 \ +test1355 test1356 test1357 test1358 test1359 test1360 test1361 test1362 \ +test1363 \ test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \ test2000 test2001 test2002 test2003 test2004 diff --git a/tests/data/test1356 b/tests/data/test1356 new file mode 100644 index 000000000..177395ea2 --- /dev/null +++ b/tests/data/test1356 @@ -0,0 +1,82 @@ + + + +FTP +RETR + + + +# Server-side + +# file1356 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1356; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with Content-Disposition inside, using -O + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1356 -O + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1356 +RETR file1356 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1356; charset=funny; option=strange + +MOOOO + + + + + + + + + + + + + diff --git a/tests/data/test1357 b/tests/data/test1357 new file mode 100644 index 000000000..0defd8309 --- /dev/null +++ b/tests/data/test1357 @@ -0,0 +1,99 @@ + + + +FTP +RETR + + + +# Server-side + +# file1357 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1357; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -D file + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1357 -O -D log/heads1357 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1357 +RETR file1357 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1357; charset=funny; option=strange + +MOOOO + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1357 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + + + + diff --git a/tests/data/test1358 b/tests/data/test1358 new file mode 100644 index 000000000..5855d1d9e --- /dev/null +++ b/tests/data/test1358 @@ -0,0 +1,99 @@ + + + +FTP +RETR + + + +# Server-side + +# file1358 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1358; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -D stdout + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1358 -O -D - + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1358 +RETR file1358 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1358; charset=funny; option=strange + +MOOOO + + + + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1358 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + diff --git a/tests/data/test1359 b/tests/data/test1359 new file mode 100644 index 000000000..62a8f5199 --- /dev/null +++ b/tests/data/test1359 @@ -0,0 +1,100 @@ + + + +FTP +RETR + + + +# Server-side + +# file1359 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1359; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -J -D file + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1359 -O -J -D log/heads1359 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1359 +RETR file1359 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1359; charset=funny; option=strange + +MOOOO + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1359 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + +curl: Saved to filename '%PWD/log/file1359' + + + + + + + diff --git a/tests/data/test1360 b/tests/data/test1360 new file mode 100644 index 000000000..536718660 --- /dev/null +++ b/tests/data/test1360 @@ -0,0 +1,100 @@ + + + +FTP +RETR + + + +# Server-side + +# file1360 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1360; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -J -D stdout + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1360 -O -J -D - + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1360 +RETR file1360 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1360; charset=funny; option=strange + +MOOOO + + + + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1360 () (214 bytes). +226 File transfer complete +curl: Saved to filename '%PWD/log/file1360' + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + diff --git a/tests/data/test1361 b/tests/data/test1361 new file mode 100644 index 000000000..b30d90066 --- /dev/null +++ b/tests/data/test1361 @@ -0,0 +1,99 @@ + + + +FTP +RETR + + + +# Server-side + +# file1361 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1361; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -i -D file + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1361 -O -i -D log/heads1361 + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1361 +RETR file1361 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1361; charset=funny; option=strange + +MOOOO + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1361 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + + + + diff --git a/tests/data/test1362 b/tests/data/test1362 new file mode 100644 index 000000000..7d603f622 --- /dev/null +++ b/tests/data/test1362 @@ -0,0 +1,99 @@ + + + +FTP +RETR + + + +# Server-side + +# file1362 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1362; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -i -D stdout + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1362 -O -i -D - + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1362 +RETR file1362 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1362; charset=funny; option=strange + +MOOOO + + + + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1362 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + diff --git a/tests/data/test1363 b/tests/data/test1363 new file mode 100644 index 000000000..e222c783f --- /dev/null +++ b/tests/data/test1363 @@ -0,0 +1,99 @@ + + + +FTP +RETR + + + +# Server-side + +# file1363 contents... + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1363; charset=funny; option=strange + +MOOOO + + + +# Client-side + +# this relies on the debug feature to allow us to set directory to store the +# -O output in, using the CURL_TESTDIR variable + +debug + + +ftp + + +FTP download file with C-D inside, using -O -i, without -D + + +CURL_TESTDIR=%PWD/log + + +ftp://%HOSTIP:%FTPPORT/path/file1363 -O -i + + + +# Verify data after the test has been "shot" + + +USER anonymous +PASS ftp@example.com +PWD +CWD path +EPSV +TYPE I +SIZE file1363 +RETR file1363 +QUIT + + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Content-Length: 6 +Connection: close +Content-Type: text/html +Content-Disposition: filename=name1363; charset=funny; option=strange + +MOOOO + + + + + + +220- _ _ ____ _ +220- ___| | | | _ \| | +220- / __| | | | |_) | | +220- | (__| |_| | _ <| |___ +220 \___|\___/|_| \_\_____| +331 We are happy you popped in! +230 Welcome you silly person +257 "/" is current directory +250 CWD command successful. +229 Entering Passive Mode (stripped) +200 I modify TYPE as you wanted +213 214 +150 Binary data connection for 1363 () (214 bytes). +226 File transfer complete + + +s/^(229 Entering Passive Mode \().*(\).*)/${1}stripped${2}/ + + + + + + + -- cgit v1.2.3