From 51462682dbc9f1b0138b30fcd39e2a9f57d31780 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Mon, 4 Feb 2008 17:48:48 +0000 Subject: [PATCH] - client: remove the auth_type and auth_flag code. client/ http_curl.C, .h svn path=/trunk/boinc/; revision=14669 --- checkin_notes | 6 ++++++ client/http_curl.C | 25 ++++--------------------- client/http_curl.h | 3 --- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/checkin_notes b/checkin_notes index 695e237091..1fef66b129 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/client/http_curl.C b/client/http_curl.C index 81e30b18d6..b3f3b6badf 100644 --- a/client/http_curl.C +++ b/client/http_curl.C @@ -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; diff --git a/client/http_curl.h b/client/http_curl.h index 6e61ca15ba..038ee5c041 100644 --- a/client/http_curl.h +++ b/client/http_curl.h @@ -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();