- client: remove the auth_type and auth_flag code.

client/
        http_curl.C, .h

svn path=/trunk/boinc/; revision=14669
This commit is contained in:
Rom Walton 2008-02-04 17:48:48 +00:00
parent 7ea74282f4
commit 51462682db
3 changed files with 10 additions and 24 deletions

View File

@ -1098,3 +1098,9 @@ David Feb 3 2008
handle_request.C
server_types.C,h
show_shmem.C
Rom Feb 3 2008
- client: remove the auth_type and auth_flag code.
client/
http_curl.C, .h

View File

@ -159,8 +159,6 @@ HTTP_OP::HTTP_OP() {
pcurlFormEnd = NULL;
pByte = NULL;
lSeek = 0;
auth_flag = false;
auth_type = 0;
xfer_speed = 0;
reset();
}
@ -808,16 +806,11 @@ void HTTP_OP::setupProxyCurl() {
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXY, (char*) pi.http_server_name);
if (pi.use_http_auth) {
auth_flag = true;
if (auth_type) {
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, auth_type);
if (config.force_ntlm) {
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
} else {
if (config.force_ntlm) {
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
} else {
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
}
}
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
}
sprintf(szCurlProxyUserPwd, "%s:%s", pi.http_user_name, pi.http_user_passwd);
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYUSERPWD, szCurlProxyUserPwd);
}
@ -834,7 +827,6 @@ void HTTP_OP::setupProxyCurl() {
if (
strlen(pi.socks5_user_passwd)>0 || strlen(pi.socks5_user_name)>0
) {
auth_flag = false;
sprintf(szCurlProxyUserPwd, "%s:%s", pi.socks5_user_name, pi.socks5_user_passwd);
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYUSERPWD, szCurlProxyUserPwd);
curlErr = curl_easy_setopt(curlEasy, CURLOPT_PROXYAUTH, CURLAUTH_ANY & ~CURLAUTH_NTLM);
@ -990,15 +982,6 @@ void HTTP_OP_SET::got_select(FDSET_GROUP&, double timeout) {
}
}
// if proxy/socks server uses authentication and its not set yet,
// get what last transfer used
//
if (hop->auth_flag && !hop->auth_type) {
curlErr = curl_easy_getinfo(hop->curlEasy,
CURLINFO_PROXYAUTH_AVAIL, &hop->auth_type
);
}
// the op is done if curl_multi_msg_read gave us a msg for this http_op
//
hop->http_op_state = HTTP_STATE_DONE;

View File

@ -116,9 +116,6 @@ public:
// ERR_CONNECT (if server down)
// ERR_FILE_NOT_FOUND (if 404)
// ERR_HTTP_ERROR (other failures)
// save authorization types supported by proxy/socks server
bool auth_flag; // TRUE = server uses authorization
long auth_type; // 0 = haven't contacted server yet.
void reset();
void init();