From 63d109f7be8ddd027c86355dd09d02189b731a46 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Apr 2005 19:41:04 +0000 Subject: Olivier reported that even though he used CURLOPT_PORT, libcurl clearly still used the default port. He was right. I fixed the problem and added the test cases 521, 522 and 523 to verify the fix. --- tests/libtest/Makefile.am | 10 +++++++++- tests/libtest/lib521.c | 16 ++++++++++++++++ tests/libtest/lib523.c | 17 +++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 tests/libtest/lib521.c create mode 100644 tests/libtest/lib523.c (limited to 'tests/libtest') diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am index acdeb5501..ccbe2aa16 100644 --- a/tests/libtest/Makefile.am +++ b/tests/libtest/Makefile.am @@ -40,7 +40,7 @@ SUPPORTFILES = first.c test.h # These are all libcurl test programs noinst_PROGRAMS = lib500 lib501 lib502 lib503 lib504 lib505 lib506 lib507 \ lib508 lib509 lib510 lib511 lib512 lib513 lib514 lib515 lib516 lib517 \ - lib518 lib519 lib520 + lib518 lib519 lib520 lib521 lib523 lib500_SOURCES = lib500.c $(SUPPORTFILES) lib500_LDADD = $(LIBDIR)/libcurl.la @@ -125,3 +125,11 @@ lib519_DEPENDENCIES = $(LIBDIR)/libcurl.la lib520_SOURCES = lib520.c $(SUPPORTFILES) lib520_LDADD = $(LIBDIR)/libcurl.la lib520_DEPENDENCIES = $(LIBDIR)/libcurl.la + +lib521_SOURCES = lib521.c $(SUPPORTFILES) +lib521_LDADD = $(LIBDIR)/libcurl.la +lib521_DEPENDENCIES = $(LIBDIR)/libcurl.la + +lib523_SOURCES = lib523.c $(SUPPORTFILES) +lib523_LDADD = $(LIBDIR)/libcurl.la +lib523_DEPENDENCIES = $(LIBDIR)/libcurl.la diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c new file mode 100644 index 000000000..96630f303 --- /dev/null +++ b/tests/libtest/lib521.c @@ -0,0 +1,16 @@ +#include "test.h" + +int test(char *URL) +{ + CURLcode res; + CURL *curl = curl_easy_init(); + curl_easy_setopt(curl, CURLOPT_URL, URL); + curl_easy_setopt(curl, CURLOPT_PORT, atoi(arg2)); + curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); + curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); + + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + return (int)res; +} + diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c new file mode 100644 index 000000000..d0a41c5f5 --- /dev/null +++ b/tests/libtest/lib523.c @@ -0,0 +1,17 @@ +#include "test.h" + +int test(char *URL) +{ + CURLcode res; + CURL *curl = curl_easy_init(); + curl_easy_setopt(curl, CURLOPT_PROXY, arg2); + curl_easy_setopt(curl, CURLOPT_URL, URL); + curl_easy_setopt(curl, CURLOPT_PORT, 19999); + curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); + curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE); + + res = curl_easy_perform(curl); + curl_easy_cleanup(curl); + return (int)res; +} + -- cgit v1.2.3