Loading tests/libtest/libauthretry.c +10 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ #include "memdebug.h" static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, const char *userpwd) static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, const char *userpwd) { CURLcode res; char* full_url = malloc(strlen(url) + 4 + 1); Loading @@ -39,7 +40,8 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, } sprintf(full_url, "%s%04d", url, seq); fprintf(stderr, "Sending new request %d to %s with credential %s (auth %ld)\n", seq, full_url, userpwd, auth_scheme); fprintf(stderr, "Sending new request %d to %s with credential %s " "(auth %ld)\n", seq, full_url, userpwd, auth_scheme); test_setopt(curl, CURLOPT_URL, full_url); test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_HEADER, 1L); Loading @@ -54,12 +56,14 @@ test_cleanup: return res; } static int send_wrong_password(CURL *curl, const char *url, int seq, long auth_scheme) static int send_wrong_password(CURL *curl, const char *url, int seq, long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass"); } static int send_right_password(CURL *curl, const char *url, int seq, long auth_scheme) static int send_right_password(CURL *curl, const char *url, int seq, long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:testpass"); } Loading Loading
tests/libtest/libauthretry.c +10 −6 Original line number Diff line number Diff line Loading @@ -28,7 +28,8 @@ #include "memdebug.h" static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, const char *userpwd) static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, const char *userpwd) { CURLcode res; char* full_url = malloc(strlen(url) + 4 + 1); Loading @@ -39,7 +40,8 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme, } sprintf(full_url, "%s%04d", url, seq); fprintf(stderr, "Sending new request %d to %s with credential %s (auth %ld)\n", seq, full_url, userpwd, auth_scheme); fprintf(stderr, "Sending new request %d to %s with credential %s " "(auth %ld)\n", seq, full_url, userpwd, auth_scheme); test_setopt(curl, CURLOPT_URL, full_url); test_setopt(curl, CURLOPT_VERBOSE, 1L); test_setopt(curl, CURLOPT_HEADER, 1L); Loading @@ -54,12 +56,14 @@ test_cleanup: return res; } static int send_wrong_password(CURL *curl, const char *url, int seq, long auth_scheme) static int send_wrong_password(CURL *curl, const char *url, int seq, long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass"); } static int send_right_password(CURL *curl, const char *url, int seq, long auth_scheme) static int send_right_password(CURL *curl, const char *url, int seq, long auth_scheme) { return send_request(curl, url, seq, auth_scheme, "testuser:testpass"); } Loading