Lines Matching refs:curl
12 * are also available at https://curl.se/docs/copyright.html.
21 * SPDX-License-Identifier: curl
32 static CURLcode send_request(CURL *curl, const char *url, int seq,
46 test_setopt(curl, CURLOPT_URL, full_url);
47 test_setopt(curl, CURLOPT_VERBOSE, 1L);
48 test_setopt(curl, CURLOPT_HEADER, 1L);
49 test_setopt(curl, CURLOPT_HTTPGET, 1L);
50 test_setopt(curl, CURLOPT_USERPWD, userpwd);
51 test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme);
53 res = curl_easy_perform(curl);
60 static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
63 return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
66 static CURLcode send_right_password(CURL *curl, const char *url, int seq,
69 return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
88 CURL *curl = NULL;
106 curl = curl_easy_init();
107 if(!curl) {
113 res = send_wrong_password(curl, url, 100, main_auth_scheme);
117 res = send_right_password(curl, url, 200, fallback_auth_scheme);
121 curl_easy_cleanup(curl);
124 curl = curl_easy_init();
125 if(!curl) {
131 res = send_wrong_password(curl, url, 300, main_auth_scheme);
135 res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
139 res = send_right_password(curl, url, 500, fallback_auth_scheme);
145 curl_easy_cleanup(curl);