Lines Matching defs:curl
12 * are also available at http://curl.haxx.se/docs/copyright.html.
31 static CURLcode send_request(CURL *curl, const char *url, int seq,
44 test_setopt(curl, CURLOPT_URL, full_url);
45 test_setopt(curl, CURLOPT_VERBOSE, 1L);
46 test_setopt(curl, CURLOPT_HEADER, 1L);
47 test_setopt(curl, CURLOPT_HTTPGET, 1L);
48 test_setopt(curl, CURLOPT_USERPWD, userpwd);
49 test_setopt(curl, CURLOPT_HTTPAUTH, auth_scheme);
51 res = curl_easy_perform(curl);
58 static CURLcode send_wrong_password(CURL *curl, const char *url, int seq,
61 return send_request(curl, url, seq, auth_scheme, "testuser:wrongpass");
64 static CURLcode send_right_password(CURL *curl, const char *url, int seq,
67 return send_request(curl, url, seq, auth_scheme, "testuser:testpass");
86 CURL *curl = NULL;
104 if ((curl = curl_easy_init()) == NULL) {
110 res = send_wrong_password(curl, url, 100, main_auth_scheme);
113 curl_easy_reset(curl);
115 res = send_right_password(curl, url, 200, fallback_auth_scheme);
118 curl_easy_reset(curl);
120 curl_easy_cleanup(curl);
124 if ((curl = curl_easy_init()) == NULL) {
130 res = send_wrong_password(curl, url, 300, main_auth_scheme);
133 curl_easy_reset(curl);
135 res = send_wrong_password(curl, url, 400, fallback_auth_scheme);
138 curl_easy_reset(curl);
140 res = send_right_password(curl, url, 500, fallback_auth_scheme);
143 curl_easy_reset(curl);
147 curl_easy_cleanup(curl);