Lines Matching refs:curl
32 static CURLcode send_request(CURL *curl, const char *url, int seq, in send_request() argument
46 test_setopt(curl, CURLOPT_URL, full_url); in send_request()
47 test_setopt(curl, CURLOPT_VERBOSE, 1L); in send_request()
48 test_setopt(curl, CURLOPT_HEADER, 1L); in send_request()
49 test_setopt(curl, CURLOPT_HTTPGET, 1L); in send_request()
50 test_setopt(curl, CURLOPT_USERPWD, userpwd); in send_request()
51 test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme); in send_request()
53 res = curl_easy_perform(curl); in send_request()
60 static CURLcode send_wrong_password(CURL *curl, const char *url, int seq, in send_wrong_password() argument
63 return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass"); in send_wrong_password()
66 static CURLcode send_right_password(CURL *curl, const char *url, int seq, in send_right_password() argument
69 return send_request(curl, url, seq, auth_scheme, "testuser:testpass"); in send_right_password()
88 CURL *curl = NULL; in test() local
106 curl = curl_easy_init(); in test()
107 if(!curl) { in test()
113 res = send_wrong_password(curl, url, 100, main_auth_scheme); in test()
117 res = send_right_password(curl, url, 200, fallback_auth_scheme); in test()
121 curl_easy_cleanup(curl); in test()
124 curl = curl_easy_init(); in test()
125 if(!curl) { in test()
131 res = send_wrong_password(curl, url, 300, main_auth_scheme); in test()
135 res = send_wrong_password(curl, url, 400, fallback_auth_scheme); in test()
139 res = send_right_password(curl, url, 500, fallback_auth_scheme); in test()
145 curl_easy_cleanup(curl); in test()