summaryrefslogtreecommitdiff
path: root/indra/llcorehttp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r--indra/llcorehttp/_httpoprequest.cpp5
-rw-r--r--indra/llcorehttp/_httpservice.h2
-rw-r--r--indra/llcorehttp/_refcounted.h2
-rw-r--r--indra/llcorehttp/_thread.h1
-rw-r--r--indra/llcorehttp/httpcommon.cpp4
-rw-r--r--indra/llcorehttp/tests/test_httprequest.hpp14
6 files changed, 23 insertions, 5 deletions
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/llcorehttp/_httpservice.h b/indra/llcorehttp/_httpservice.h
index ac518a5de7..d0c37ac195 100644
--- a/indra/llcorehttp/_httpservice.h
+++ b/indra/llcorehttp/_httpservice.h
@@ -31,7 +31,7 @@
#include <vector>
#include "linden_common.h"
-#include "llapr.h"
+#include "llatomic.h"
#include "httpcommon.h"
#include "httprequest.h"
#include "_httppolicyglobal.h"
diff --git a/indra/llcorehttp/_refcounted.h b/indra/llcorehttp/_refcounted.h
index 7f713f2298..5cc8914395 100644
--- a/indra/llcorehttp/_refcounted.h
+++ b/indra/llcorehttp/_refcounted.h
@@ -34,7 +34,7 @@
#include <boost/thread.hpp>
#include <boost/intrusive_ptr.hpp>
-#include "llapr.h"
+#include "llatomic.h"
namespace LLCoreInt
diff --git a/indra/llcorehttp/_thread.h b/indra/llcorehttp/_thread.h
index e058d660e5..22b7750bad 100644
--- a/indra/llcorehttp/_thread.h
+++ b/indra/llcorehttp/_thread.h
@@ -33,6 +33,7 @@
#include <boost/function.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include "apr.h" // thread-related functions
#include "_refcounted.h"
namespace LLCoreInt
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 1829062af6..7c93c54cdf 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -333,7 +333,7 @@ LLMutex *getCurlMutex()
if (!sHandleMutexp)
{
- sHandleMutexp = new LLMutex(NULL);
+ sHandleMutexp = new LLMutex();
}
return sHandleMutexp;
@@ -389,7 +389,7 @@ void initialize()
S32 mutex_count = CRYPTO_num_locks();
for (S32 i = 0; i < mutex_count; i++)
{
- sSSLMutex.push_back(LLMutex_ptr(new LLMutex(NULL)));
+ sSSLMutex.push_back(LLMutex_ptr(new LLMutex()));
}
CRYPTO_set_id_callback(&ssl_thread_id);
CRYPTO_set_locking_callback(&ssl_locking_callback);
diff --git a/indra/llcorehttp/tests/test_httprequest.hpp b/indra/llcorehttp/tests/test_httprequest.hpp
index b450f3502e..e65588e48f 100644
--- a/indra/llcorehttp/tests/test_httprequest.hpp
+++ b/indra/llcorehttp/tests/test_httprequest.hpp
@@ -2903,6 +2903,13 @@ void HttpRequestTestObjectType::test<22>()
set_test_name("BUG-2295");
+#if LL_WINDOWS && ADDRESS_SIZE == 64
+ // teamcity win64 builds freeze on this test, if you figure out the cause, please fix it
+ if (getenv("TEAMCITY_PROJECT_NAME"))
+ {
+ skip("BUG-2295 - partial load on W64 causes freeze");
+ }
+#endif
// Handler can be stack-allocated *if* there are no dangling
// references to it after completion of this method.
// Create before memory record as the string copy will bump numbers.
@@ -2921,6 +2928,7 @@ void HttpRequestTestObjectType::test<22>()
// options set
options = HttpOptions::ptr_t(new HttpOptions());
options->setRetries(1); // Partial_File is retryable and can timeout in here
+ options->setDNSCacheTimeout(30);
// Get singletons created
HttpRequest::createService();
@@ -3091,7 +3099,11 @@ void HttpRequestTestObjectType::test<23>()
set_test_name("HttpRequest GET 503s with 'Retry-After'");
#if LL_WINDOWS && ADDRESS_SIZE == 64
- skip("llcorehttp 503-with-retry test hangs on Windows 64");
+ // teamcity win64 builds freeze on this test, if you figure out the cause, please fix it
+ if (getenv("TEAMCITY_PROJECT_NAME"))
+ {
+ skip("llcorehttp 503-with-retry test hangs on Windows 64");
+ }
#endif
// This tests mainly that the code doesn't fall over if