summaryrefslogtreecommitdiff
path: root/tests/data/test337
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-09-12 17:50:21 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-09-13 14:21:00 +0200
commit65f5b958c95d538a9b205e2753a476d1a7c89179 (patch)
treedc6894cf318ac173b56bfa62a708049d41feb36e /tests/data/test337
parentacf1d2acd17b194966be41e848ffd48b02ecef0c (diff)
downloadcurl-65f5b958c95d538a9b205e2753a476d1a7c89179.tar.gz
FTP: allow "rubbish" prepended to the SIZE response
This is a protocol violation but apparently there are legacy proprietary servers doing this. Added test 336 and 337 to verify. Reported-by: Philippe Marguinaud Closes #4339
Diffstat (limited to 'tests/data/test337')
-rw-r--r--tests/data/test33758
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/data/test337 b/tests/data/test337
new file mode 100644
index 000000000..80086dda7
--- /dev/null
+++ b/tests/data/test337
@@ -0,0 +1,58 @@
+<testcase>
+<info>
+<keywords>
+FTP
+PASV
+TYPE A
+RETR
+</keywords>
+</info>
+# Server-side
+<reply>
+<data>
+data
+ to
+ see
+that FTP
+works
+ so does it?
+</data>
+<datacheck nonewline="yes">
+data
+</datacheck>
+<servercmd>
+REPLY EPSV 500 no such command
+REPLY SIZE 213 file: 213, Size =51
+</servercmd>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+ <name>
+FTP range download with SIZE returning extra crap
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/337 --use-ascii --range 3-6
+</command>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+<protocol>
+USER anonymous
+PASS ftp@example.com
+PWD
+EPSV
+PASV
+TYPE A
+SIZE 337
+REST 3
+RETR 337
+ABOR
+QUIT
+</protocol>
+</verify>
+</testcase>