summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llcurl.cpp4
-rw-r--r--indra/llmessage/llhttpassetstorage.cpp4
-rw-r--r--indra/llmessage/llnamevalue.cpp4
-rw-r--r--indra/llmessage/llnamevalue.h4
4 files changed, 12 insertions, 4 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp
index c3ffbcc8ed..8c7392090c 100644
--- a/indra/llmessage/llcurl.cpp
+++ b/indra/llmessage/llcurl.cpp
@@ -265,6 +265,10 @@ LLCurl::Easy* LLCurl::Easy::getEasy()
delete easy;
return NULL;
}
+
+ // set no DMS caching as default for all easy handles. This prevents them adopting a
+ // multi handles cache if they are added to one.
+ curl_easy_setopt(easy->mCurlEasyHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
++gCurlEasyCount;
return easy;
}
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 6332c247a9..bf76c17873 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -256,6 +256,10 @@ void LLHTTPAssetRequest::setupCurlHandle()
// disable use of proxy, which can't handle chunked transfers
}
mHTTPHeaders = curl_slist_append(mHTTPHeaders, "Pragma:");
+
+ // bug in curl causes DNS to be cached for too long a time, 0 sets it to never cache DNS results internally (to curl)
+ curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
+
// resist the temptation to explicitly add the Transfer-Encoding: chunked
// header here - invokes a libCURL bug
curl_easy_setopt(mCurlHandle, CURLOPT_HTTPHEADER, mHTTPHeaders);
diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp
index 13dca3e51f..5875587186 100644
--- a/indra/llmessage/llnamevalue.cpp
+++ b/indra/llmessage/llnamevalue.cpp
@@ -896,7 +896,7 @@ void LLNameValue::setVec3(const LLVector3 &a)
}
-std::string LLNameValue::printNameValue()
+std::string LLNameValue::printNameValue() const
{
std::string buffer;
buffer = llformat("%s %s %s %s ", mName, mStringType, mStringClass, mStringSendto);
@@ -905,7 +905,7 @@ std::string LLNameValue::printNameValue()
return buffer;
}
-std::string LLNameValue::printData()
+std::string LLNameValue::printData() const
{
std::string buffer;
switch(mType)
diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h
index f50ed08207..f492015b4a 100644
--- a/indra/llmessage/llnamevalue.h
+++ b/indra/llmessage/llnamevalue.h
@@ -148,8 +148,8 @@ public:
BOOL sendToViewer() const;
void callCallback();
- std::string printNameValue();
- std::string printData();
+ std::string printNameValue() const;
+ std::string printData() const;
ENameValueType getTypeEnum() const { return mType; }
ENameValueClass getClassEnum() const { return mClass; }