mirror of
https://github.com/curl/curl.git
synced 2026-08-25 23:43:35 +03:00
Active mode FTP test cases with server not establishing data connection
591 -> FTP multi PORT and 425 on upload 592 -> FTP multi PORT and 421 on upload 593 -> FTP multi PORT upload, no data conn and no transient neg. reply 594 -> FTP multi PORT upload, no data conn and no positive prelim. reply 1206 -> FTP PORT and 425 on download 1207 -> FTP PORT and 421 on download 1208 -> FTP PORT download, no data conn and no transient negative reply 1209 -> FTP PORT download, no data conn and no positive preliminary reply
This commit is contained in:
parent
fd765c627f
commit
082e8a3b03
12 changed files with 465 additions and 20 deletions
|
|
@ -15,8 +15,8 @@ noinst_PROGRAMS = chkhostname \
|
|||
lib579 lib529 lib530 lib532 lib533 lib536 lib537 lib540 lib541 lib542 \
|
||||
lib543 lib544 lib545 lib547 lib548 lib549 lib552 lib553 lib554 lib555 \
|
||||
lib556 lib539 lib557 lib560 lib562 lib564 lib565 lib566 lib567 lib568 \
|
||||
lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585 lib587 lib589 \
|
||||
lib590
|
||||
lib569 lib570 lib571 lib572 lib573 lib582 lib583 lib585 lib587 lib590 \
|
||||
lib591
|
||||
|
||||
chkhostname_SOURCES = chkhostname.c $(top_srcdir)/lib/curl_gethostname.c
|
||||
chkhostname_LDADD = @CURL_NETWORK_LIBS@
|
||||
|
|
@ -171,6 +171,6 @@ lib585_CPPFLAGS = $(AM_CPPFLAGS) -DLIB585
|
|||
lib587_SOURCES = lib554.c $(SUPPORTFILES)
|
||||
lib587_CPPFLAGS = $(AM_CPPFLAGS) -DLIB587
|
||||
|
||||
lib589_SOURCES = lib589.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
|
||||
|
||||
lib590_SOURCES = lib590.c $(SUPPORTFILES)
|
||||
|
||||
lib591_SOURCES = lib591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
***************************************************************************/
|
||||
#include "test.h"
|
||||
|
||||
/* lib591 is used for test cases 591, 592, 593 and 594 */
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "testutil.h"
|
||||
|
|
@ -42,12 +44,12 @@ int test(char *URL)
|
|||
|
||||
start_test_timing();
|
||||
|
||||
upload = fopen(libtest_arg2, "rb");
|
||||
upload = fopen(libtest_arg3, "rb");
|
||||
if(!upload) {
|
||||
error = ERRNO;
|
||||
fprintf(stderr, "fopen() failed with error: %d (%s)\n",
|
||||
error, strerror(error));
|
||||
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg2);
|
||||
fprintf(stderr, "Error opening file: (%s)\n", libtest_arg3);
|
||||
return TEST_ERR_FOPEN;
|
||||
}
|
||||
|
||||
|
|
@ -74,6 +76,9 @@ int test(char *URL)
|
|||
/* use active mode FTP */
|
||||
easy_setopt(easy, CURLOPT_FTPPORT, "-");
|
||||
|
||||
/* server connection timeout */
|
||||
easy_setopt(easy, CURLOPT_CONNECTTIMEOUT, strtol(libtest_arg2, NULL, 10));
|
||||
|
||||
multi_init(multi);
|
||||
|
||||
multi_add_handle(multi, easy);
|
||||
Loading…
Add table
Add a link
Reference in a new issue