Home | History | Annotate | Download | only in libtest

Lines Matching refs:CURL

12  * are also available at https://curl.haxx.se/docs/copyright.html.
31 static CURLcode send_request(CURL *curl, const char *url, int seq,
45 test_setopt(curl, CURLOPT_URL, full_url);
46 test_setopt(curl, CURLOPT_VERBOSE, 1L);
47 test_setopt(curl, CURLOPT_HEADER, 1L);
48 test_setopt(curl, CURLOPT_HTTPGET, 1L);
49 test_setopt(curl, CURLOPT_USERPWD, userpwd);
50 test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme);
52 res = curl_easy_perform(curl);
59 static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
62 return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
65 static CURLcode send_right_password(CURL *curl, const char *url, int seq,
68 return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
87 CURL *curl = NULL;
105 if((curl = curl_easy_init()) == NULL) {
111 res = send_wrong_password(curl, url, 100, main_auth_scheme);
114 curl_easy_reset(curl);
116 res = send_right_password(curl, url, 200, fallback_auth_scheme);
119 curl_easy_reset(curl);
121 curl_easy_cleanup(curl);
125 if((curl = curl_easy_init()) == NULL) {
131 res = send_wrong_password(curl, url, 300, main_auth_scheme);
134 curl_easy_reset(curl);
136 res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
139 curl_easy_reset(curl);
141 res = send_right_password(curl, url, 500, fallback_auth_scheme);
144 curl_easy_reset(curl);
148 curl_easy_cleanup(curl);