summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpoptions.cpp
diff options
context:
space:
mode:
authorRider Linden <none@none>2015-03-16 17:14:34 -0700
committerRider Linden <none@none>2015-03-16 17:14:34 -0700
commit6f4d36634e980bb989b9a8b762c3c622804c43dd (patch)
treeefa71ac14bdef46b9796688d4a445d60fdd5b1c3 /indra/llcorehttp/httpoptions.cpp
parentd4a2e9fd9a0e7001a6c824ddd6cf37039a632b9d (diff)
Removal of RPCXML dep on LLCurl switching to LLCore::Html
Diffstat (limited to 'indra/llcorehttp/httpoptions.cpp')
-rwxr-xr-xindra/llcorehttp/httpoptions.cpp39
1 files changed, 30 insertions, 9 deletions
diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp
index 5bf1ecb4a5..28c2c25e92 100755
--- a/indra/llcorehttp/httpoptions.cpp
+++ b/indra/llcorehttp/httpoptions.cpp
@@ -25,7 +25,7 @@
*/
#include "httpoptions.h"
-
+#include "lldefs.h"
#include "_httpinternal.h"
@@ -33,14 +33,17 @@ namespace LLCore
{
-HttpOptions::HttpOptions()
- : RefCounted(true),
- mWantHeaders(false),
- mTracing(HTTP_TRACE_OFF),
- mTimeout(HTTP_REQUEST_TIMEOUT_DEFAULT),
- mTransferTimeout(HTTP_REQUEST_XFER_TIMEOUT_DEFAULT),
- mRetries(HTTP_RETRY_COUNT_DEFAULT),
- mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT)
+HttpOptions::HttpOptions() : RefCounted(true),
+ mWantHeaders(false),
+ mTracing(HTTP_TRACE_OFF),
+ mTimeout(HTTP_REQUEST_TIMEOUT_DEFAULT),
+ mTransferTimeout(HTTP_REQUEST_XFER_TIMEOUT_DEFAULT),
+ mRetries(HTTP_RETRY_COUNT_DEFAULT),
+ mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT),
+ mFollowRedirects(false),
+ mVerifyPeer(false),
+ mVerifyHost(0),
+ mDNSCacheTimeout(15)
{}
@@ -82,5 +85,23 @@ void HttpOptions::setUseRetryAfter(bool use_retry)
mUseRetryAfter = use_retry;
}
+void HttpOptions::setFollowRedirects(bool follow_redirect)
+{
+ mFollowRedirects = follow_redirect;
+}
+
+void HttpOptions::setSSLVerifyPeer(bool verify)
+{
+ mVerifyPeer = verify;
+}
+void HttpOptions::setSSLVerifyHost(unsigned int type)
+{
+ mVerifyHost = llclamp<unsigned int>(type, 0, 2);
+}
+
+void HttpOptions::setDNSCacheTimeout(int timeout)
+{
+ mDNSCacheTimeout = timeout;
+}
} // end namespace LLCore