aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-12-11 09:32:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-12-11 09:32:58 +0000
commit88c8d72a214864952b6d1c2347b6c3f5b7d69e84 (patch)
tree965d76e2bd0a815d0ec6754f7d2f7db23d8f6a70 /tests
parentcf99fed17a99d11a7c4e93855a97402b669afb7d (diff)
Alexey Simak found out that when doing FTP with the multi interface and
something went wrong like it got a bad response code back from the server, libcurl would leak memory. Added test case 538 to verify the fix. I also noted that the connection would get cached in that case, which doesn't make sense since it cannot be re-use when the authentication has failed. I fixed that issue too at the same time, and also that the path would be "remembered" in vain for cases where the connection was about to get closed.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/Makefile.am2
-rw-r--r--tests/data/test53842
2 files changed, 43 insertions, 1 deletions
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index d0abffa23..e079012bc 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -36,4 +36,4 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test265 test266 test267 test268 test269 test270 test271 test272 test273 \
test274 test275 test524 test525 test276 test277 test526 test527 test528 \
test530 DISABLED test278 test279 test531 test280 test529 test532 test533 \
- test534 test535 test281 test537 test282
+ test534 test535 test281 test537 test282 test538
diff --git a/tests/data/test538 b/tests/data/test538
new file mode 100644
index 000000000..6ad2aac13
--- /dev/null
+++ b/tests/data/test538
@@ -0,0 +1,42 @@
+<info>
+<keywords>
+FTP
+FAILURE
+</keywords>
+</info>
+# Server-side
+<reply>
+</reply>
+
+# Client-side
+<client>
+<server>
+ftp
+</server>
+# NOTE that we use the 504 tool for this case
+<tool>
+lib504
+</tool>
+ <name>
+FTP multi-interface download, failed login: PASS not valid
+ </name>
+ <command>
+ftp://%HOSTIP:%FTPPORT/538
+</command>
+<file name="log/ftpserver.cmd">
+REPLY PASS 314 bluah you f00l!
+</file>
+</client>
+
+# Verify data after the test has been "shot"
+<verify>
+# ok, the error code here is supposed to be 100 for the fine case since
+# that's just how lib504.c is written
+<errorcode>
+100
+</errorcode>
+<protocol>
+USER anonymous
+PASS curl_by_daniel@haxx.se
+</protocol>
+</verify>