From 222bca24c12e162669c1a810c3102811f21cfbe4 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 5 Sep 2008 22:03:35 +0000 Subject: svn merge -r95288:95907 svn+ssh://svn.lindenlab.com/svn/linden/qa/maint-server/qar-841 this is a combined mergeback of the following branches as per QAR-841: maint-server/maint-server-1 (absorbed by maint-server-2) maint-server/maint-server-2 maint-server/maint-server-3 havok4/havok4-8 havok4/havok4-9 yes dataserver-is-deprecated --- indra/llmessage/llcurl.cpp | 4 ++++ indra/llmessage/llhttpassetstorage.cpp | 4 ++++ indra/llmessage/llnamevalue.cpp | 4 ++-- indra/llmessage/llnamevalue.h | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'indra/llmessage') 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; } -- cgit v1.2.3