From 6f4d36634e980bb989b9a8b762c3c622804c43dd Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 16 Mar 2015 17:14:34 -0700 Subject: Removal of RPCXML dep on LLCurl switching to LLCore::Html --- indra/llcorehttp/httpoptions.cpp | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'indra/llcorehttp/httpoptions.cpp') 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(type, 0, 2); +} + +void HttpOptions::setDNSCacheTimeout(int timeout) +{ + mDNSCacheTimeout = timeout; +} } // end namespace LLCore -- cgit v1.2.3 From 735364038767694ea29d9b6a168410e6482cc9c2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 27 Mar 2015 17:00:02 -0700 Subject: first set of chnages from code review from Nat --- indra/llcorehttp/httpoptions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/llcorehttp/httpoptions.cpp') diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index 28c2c25e92..a4d08a80df 100755 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -42,8 +42,8 @@ HttpOptions::HttpOptions() : RefCounted(true), mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT), mFollowRedirects(false), mVerifyPeer(false), - mVerifyHost(0), - mDNSCacheTimeout(15) + mVerifyHost(false), + mDNSCacheTimeout(-1L) {} @@ -95,9 +95,9 @@ void HttpOptions::setSSLVerifyPeer(bool verify) mVerifyPeer = verify; } -void HttpOptions::setSSLVerifyHost(unsigned int type) +void HttpOptions::setSSLVerifyHost(bool verify) { - mVerifyHost = llclamp(type, 0, 2); + mVerifyHost = verify; } void HttpOptions::setDNSCacheTimeout(int timeout) -- cgit v1.2.3 From 83543e556cba8753077c9f004bb0dc71b4509007 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 27 May 2015 17:15:01 -0700 Subject: Memory leak (extra ref) in webprofile Viewer media routines to coroutine. Post with raw respons in llcorehttputil LLCore::Http added headers only option (applies only on get) --- indra/llcorehttp/httpoptions.cpp | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'indra/llcorehttp/httpoptions.cpp') diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index a4d08a80df..2b42bcaf6d 100755 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -34,16 +34,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), - mFollowRedirects(false), - mVerifyPeer(false), - mVerifyHost(false), - mDNSCacheTimeout(-1L) + 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(false), + mDNSCacheTimeout(-1L), + mNoBody(false) {} @@ -104,4 +105,12 @@ void HttpOptions::setDNSCacheTimeout(int timeout) { mDNSCacheTimeout = timeout; } + +void HttpOptions::setHeadersOnly(bool nobody) +{ + mNoBody = nobody; + if (mNoBody) + setWantHeaders(true); +} + } // end namespace LLCore -- cgit v1.2.3 From 68da6fa846fee1e3c5fb478945ef54f83a86aacd Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 1 Jun 2015 16:54:53 -0700 Subject: Set follow redirects so that the default is the same when no options are are specified and when follow redirects is not specified on the options object. --- indra/llcorehttp/httpoptions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcorehttp/httpoptions.cpp') diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index 2b42bcaf6d..3459a37aff 100755 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -40,7 +40,7 @@ HttpOptions::HttpOptions() : RefCounted(true), mTransferTimeout(HTTP_REQUEST_XFER_TIMEOUT_DEFAULT), mRetries(HTTP_RETRY_COUNT_DEFAULT), mUseRetryAfter(HTTP_USE_RETRY_AFTER_DEFAULT), - mFollowRedirects(false), + mFollowRedirects(true), mVerifyPeer(false), mVerifyHost(false), mDNSCacheTimeout(-1L), -- cgit v1.2.3 From fe5567639d7d4b6f13f66da0a1fb4bf2af295283 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 8 Jul 2015 12:09:36 -0700 Subject: Change HttpOptions::ptr_t to be shared_ptr<> rather than intrusive. --- indra/llcorehttp/httpoptions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcorehttp/httpoptions.cpp') diff --git a/indra/llcorehttp/httpoptions.cpp b/indra/llcorehttp/httpoptions.cpp index 3459a37aff..aab447f2dd 100755 --- a/indra/llcorehttp/httpoptions.cpp +++ b/indra/llcorehttp/httpoptions.cpp @@ -33,7 +33,7 @@ namespace LLCore { -HttpOptions::HttpOptions() : RefCounted(true), +HttpOptions::HttpOptions() : mWantHeaders(false), mTracing(HTTP_TRACE_OFF), mTimeout(HTTP_REQUEST_TIMEOUT_DEFAULT), -- cgit v1.2.3