From a48ff6c2fadb5697ab204a34ac696f1ce920e02d Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 6 Dec 2018 19:50:33 +0200 Subject: SL-10172 Add a KB link to the TLS failure dialog --- indra/newview/llxmlrpctransaction.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index 143c97fca4..f5c169996f 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -507,6 +507,8 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) case CURLE_SSL_CACERT: case CURLE_SSL_CONNECT_ERROR: + { + std::string uri_base = "https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3"; message = "Often this means that your computer\'s clock is set incorrectly.\n" "Please go to Control Panels and make sure the time and date\n" @@ -514,8 +516,9 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) "Also check that your network and firewall are set up correctly.\n" "If you continue to receive this error, please go\n" "to the Support section of the SecondLife.com web site\n" - "and report the problem."; + "and report the problem.\n\n[" + uri_base + " Knowledge Base]"; break; + } default: break; -- cgit v1.3 From 21d4ce26d3b3db5458321271ea5b7c7069289c94 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 12 Dec 2018 00:11:16 +0200 Subject: INTL-324 added support for TLS failure dialog localization --- indra/newview/llxmlrpctransaction.cpp | 31 ++++++-------------------- indra/newview/skins/default/xui/en/strings.xml | 25 +++++++++++++++++++++ 2 files changed, 32 insertions(+), 24 deletions(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index f5c169996f..cc223c1f48 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -483,42 +483,25 @@ void LLXMLRPCTransaction::Impl::setHttpStatus(const LLCore::HttpStatus &status) { CURLcode code = static_cast(status.toULong()); std::string message; - std::string uri = "http://secondlife.com/community/support.php"; + std::string uri = "http://support.secondlife.com"; LLURI failuri(mURI); - + LLStringUtil::format_map_t args; switch (code) { case CURLE_COULDNT_RESOLVE_HOST: - message = - std::string("DNS could not resolve the host name(") + failuri.hostName() + ").\n" - "Please verify that you can connect to the www.secondlife.com\n" - "web site. If you can, but continue to receive this error,\n" - "please go to the support section and report this problem."; + args["[HOSTNAME]"] = failuri.hostName(); + message = LLTrans::getString("couldnt_resolve_host", args); break; case CURLE_SSL_PEER_CERTIFICATE: - message = - "The login server couldn't verify itself via SSL.\n" - "If you continue to receive this error, please go\n" - "to the Support section of the SecondLife.com web site\n" - "and report the problem."; + message = LLTrans::getString("ssl_peer_certificate"); break; case CURLE_SSL_CACERT: - case CURLE_SSL_CONNECT_ERROR: - { - std::string uri_base = "https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3"; - message = - "Often this means that your computer\'s clock is set incorrectly.\n" - "Please go to Control Panels and make sure the time and date\n" - "are set correctly.\n" - "Also check that your network and firewall are set up correctly.\n" - "If you continue to receive this error, please go\n" - "to the Support section of the SecondLife.com web site\n" - "and report the problem.\n\n[" + uri_base + " Knowledge Base]"; + case CURLE_SSL_CONNECT_ERROR: + message = LLTrans::getString("ssl_connect_error"); break; - } default: break; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index f5f4b4acab..e8fdb2d5b1 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -4233,4 +4233,29 @@ Try enclosing path to the editor with double quotes. The physics shape does not have correct version. Set the correct version for the physics model. + + +DNS could not resolve the host name([HOSTNAME]). +Please verify that you can connect to the www.secondlife.com +web site. If you can, but continue to receive this error, +please go to the support section and report this problem. + + +The login server couldn't verify itself via SSL. +If you continue to receive this error, please go +to the Support section of the SecondLife.com web site +and report the problem. + + +Often this means that your computer's clock is set incorrectly. +Please go to Control Panels and make sure the time and date +are set correctly. +Also check that your network and firewall are set up correctly. +If you continue to receive this error, please go +to the Support section of the SecondLife.com web site +and report the problem. + +[https://community.secondlife.com/knowledgebase/english/error-messages-r520/#Section__3 Knowledge Base] + + -- cgit v1.3 From d785c87d620cb17681ea6d3011461154d96ab9d5 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 29 Jan 2019 21:33:31 +0200 Subject: SL-2364 Fixed Viewer Caches Login Host DNS Entries Indefinetely --- indra/llcorehttp/_httpoprequest.cpp | 5 +++++ indra/newview/lllogininstance.cpp | 7 ++++++- indra/newview/llxmlrpctransaction.cpp | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/llxmlrpctransaction.cpp') diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index cc49a2af80..0f76ff23ea 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -555,6 +555,11 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) // about 700 or so requests and starts issuing TCP RSTs to // new connections. Reuse the DNS lookups for even a few // seconds and no RSTs. + // + // -1 stores forever + // 0 never stores + // any other positive number specifies seconds + // supposedly curl 7.62.0 can use TTL by default, otherwise default is 60 seconds check_curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, dnsCacheTimeout); if (gpolicy.mUseLLProxy) diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index bc93fa2c20..bf4fc029ee 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -63,6 +63,9 @@ #include const S32 LOGIN_MAX_RETRIES = 3; +const F32 LOGIN_SRV_TIMEOUT_MIN = 10; +const F32 LOGIN_SRV_TIMEOUT_MAX = 120; +const F32 LOGIN_DNS_TIMEOUT_FACTOR = 0.9; // make DNS wait shorter then retry time class LLLoginInstance::Disposable { public: @@ -232,8 +235,10 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia // Specify desired timeout/retry options LLSD http_params; - http_params["timeout"] = gSavedSettings.getF32("LoginSRVTimeout"); + F32 srv_timeout = llclamp(gSavedSettings.getF32("LoginSRVTimeout"), LOGIN_SRV_TIMEOUT_MIN, LOGIN_SRV_TIMEOUT_MAX); + http_params["timeout"] = srv_timeout; http_params["retries"] = LOGIN_MAX_RETRIES; + http_params["DNSCacheTimeout"] = srv_timeout * LOGIN_DNS_TIMEOUT_FACTOR; //Default: indefinite mRequestData.clear(); mRequestData["method"] = "login_to_simulator"; diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index cc223c1f48..8e2539606b 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -362,6 +362,10 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip, const { httpOpts->setRetries(httpParams["retries"].asInteger()); } + if (httpParams.has("DNSCacheTimeout")) + { + httpOpts->setDNSCacheTimeout(httpParams["DNSCacheTimeout"].asInteger()); + } bool vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); mCertStore = gSavedSettings.getString("CertStore"); -- cgit v1.3