mirror of
https://github.com/curl/curl.git
synced 2026-07-25 19:37:17 +03:00
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.
This commit is contained in:
parent
c904b6b5bf
commit
63d109f7be
8 changed files with 197 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
16
tests/libtest/lib521.c
Normal file
16
tests/libtest/lib521.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
||||
17
tests/libtest/lib523.c
Normal file
17
tests/libtest/lib523.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue