meow-7.2.2
Rider Linden 2015-06-30 17:13:51 -07:00
commit eca87bb24f
19 changed files with 135 additions and 87 deletions

View File

@ -143,15 +143,10 @@ private:
LLAtomic32< S32 > mRef;
};
/**
* intrusive pointer support
* this allows you to use boost::intrusive_ptr with any LLRefCount-derived type
*/
/**
* intrusive pointer support for LLThreadSafeRefCount
* this allows you to use boost::intrusive_ptr with any LLThreadSafeRefCount-derived type
*/
inline void intrusive_ptr_add_ref(LLThreadSafeRefCount* p)
{
p->ref();
@ -162,6 +157,10 @@ inline void intrusive_ptr_release(LLThreadSafeRefCount* p)
p->unref();
}
/**
* intrusive pointer support
* this allows you to use boost::intrusive_ptr with any LLRefCount-derived type
*/
inline void intrusive_ptr_add_ref(LLRefCount* p)
{
p->ref();

View File

@ -32,6 +32,7 @@
#include "fix_macros.h"
#include <boost/thread.hpp>
#include <boost/intrusive_ptr.hpp>
#include "llapr.h"
@ -120,6 +121,24 @@ inline void RefCounted::destroySelf()
delete this;
}
/**
* boost::intrusive_ptr may be used to manage RefCounted classes.
* Unfortunately RefCounted and boost::intrusive_ptr use different conventions
* for the initial refcount value. To avoid leaky (immortal) objects, you
* should really construct boost::intrusive_ptr<RefCounted*>(rawptr, false).
* IntrusivePtr<T> encapsulates that for you.
*/
template <typename T>
struct IntrusivePtr: public boost::intrusive_ptr<T>
{
IntrusivePtr():
boost::intrusive_ptr<T>()
{}
IntrusivePtr(T* p):
boost::intrusive_ptr<T>(p, false)
{}
};
inline void intrusive_ptr_add_ref(RefCounted* p)
{
p->addRef();

View File

@ -74,7 +74,7 @@ public:
BufferArray();
typedef boost::intrusive_ptr<BufferArray> ptr_t;
typedef LLCoreInt::IntrusivePtr<BufferArray> ptr_t;
protected:
virtual ~BufferArray(); // Use release()

View File

@ -92,7 +92,7 @@ public:
/// the instance.
HttpHeaders();
typedef boost::intrusive_ptr<HttpHeaders> ptr_t;
typedef LLCoreInt::IntrusivePtr<HttpHeaders> ptr_t;
protected:
virtual ~HttpHeaders(); // Use release()

View File

@ -60,7 +60,7 @@ class HttpOptions : public LLCoreInt::RefCounted
public:
HttpOptions();
typedef boost::intrusive_ptr<HttpOptions> ptr_t;
typedef LLCoreInt::IntrusivePtr<HttpOptions> ptr_t;
protected:
virtual ~HttpOptions(); // Use release()

View File

@ -397,7 +397,7 @@ bool LLCrashLogger::saveCrashBehaviorSetting(S32 crash_behavior)
bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg, int retries, int timeout)
{
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
gBreak = false;
httpOpts->setTimeout(timeout);

View File

@ -468,8 +468,8 @@ void LLAvatarNameCache::initClass(bool running, bool usePeopleAPI)
sUsePeopleAPI = usePeopleAPI;
sHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest());
sHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false);
sHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false);
sHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
sHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
sHttpPolicy = LLCore::HttpRequest::DEFAULT_POLICY_ID;
sHttpPriority = 0;
}

View File

@ -628,7 +628,7 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRe
const std::string & url, std::string fileName,
LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers)
{
LLCore::BufferArray::ptr_t fileData(new LLCore::BufferArray, false);
LLCore::BufferArray::ptr_t fileData(new LLCore::BufferArray);
// scoping for our streams so that they go away when we no longer need them.
{
@ -657,7 +657,7 @@ LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRe
const std::string & url, LLUUID assetId, LLAssetType::EType assetType,
LLCore::HttpOptions::ptr_t options, LLCore::HttpHeaders::ptr_t headers)
{
LLCore::BufferArray::ptr_t fileData(new LLCore::BufferArray, false);
LLCore::BufferArray::ptr_t fileData(new LLCore::BufferArray);
// scoping for our streams so that they go away when we no longer need them.
{
@ -926,7 +926,7 @@ void HttpCoroutineAdapter::trivialGetCoro(LLCoros::self& self, std::string url,
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericGetCoro", policyId));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
@ -977,7 +977,7 @@ void HttpCoroutineAdapter::trivialPostCoro(LLCoros::self& self, std::string url,
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("genericPostCoro", policyId));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);

View File

@ -322,18 +322,18 @@ public:
/// not be deallocated during the yield.
LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, const LLSD & body,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, LLCore::BufferArray::ptr_t rawbody,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, const LLSD & body,
LLCore::HttpHeaders::ptr_t &headers)
{
return postAndYield(self, request, url, body,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers);
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
}
LLSD postAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
@ -341,47 +341,47 @@ public:
LLCore::HttpHeaders::ptr_t &headers)
{
return postAndYield(self, request, url, rawbody,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers);
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
}
LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, LLCore::BufferArray::ptr_t rawbody,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD postRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, LLCore::BufferArray::ptr_t &rawbody,
LLCore::HttpHeaders::ptr_t &headers)
{
return postRawAndYield(self, request, url, rawbody,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers);
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
}
LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, std::string fileName,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, std::string fileName,
LLCore::HttpHeaders::ptr_t &headers)
{
return postFileAndYield(self, request, url, fileName,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers);
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
}
LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, LLUUID assetId, LLAssetType::EType assetType,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD HttpCoroutineAdapter::postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
LLSD postFileAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, LLUUID assetId, LLAssetType::EType assetType,
LLCore::HttpHeaders::ptr_t &headers)
{
return postFileAndYield(self, request, url, assetId, assetType,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false), headers);
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()), headers);
}
@ -392,8 +392,8 @@ public:
/// not be deallocated during the yield.
LLSD putAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url, const LLSD & body,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
/// Execute a Get transaction on the supplied URL and yield execution of
/// the coroutine until a result is available.
@ -402,37 +402,37 @@ public:
/// not be deallocated during the yield.
LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD getAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, LLCore::HttpHeaders::ptr_t &headers)
{
return getAndYield(self, request, url,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
headers);
}
LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD getRawAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, LLCore::HttpHeaders::ptr_t &headers)
{
return getRawAndYield(self, request, url,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
headers);
}
LLSD getJsonAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
LLSD getJsonndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t &request,
const std::string & url, LLCore::HttpHeaders::ptr_t &headers)
{
return getJsonAndYield(self, request, url,
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
headers);
}
@ -444,8 +444,8 @@ public:
/// not be deallocated during the yield.
LLSD deleteAndYield(LLCoros::self & self, LLCore::HttpRequest::ptr_t request,
const std::string & url,
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false));
LLCore::HttpOptions::ptr_t options = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions()),
LLCore::HttpHeaders::ptr_t headers = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders()));
///
void cancelYieldingOperation();

View File

@ -2370,6 +2370,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>DebugSlshareLogTag</key>
<map>
<key>Comment</key>
<string>Request slshare-service debug logging</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string/>
</map>
<key>DebugStatModeFPS</key>
<map>
<key>Comment</key>

View File

@ -41,6 +41,7 @@
#include "lltrans.h"
#include "llevents.h"
#include "llviewerregion.h"
#include "llviewercontrol.h"
#include "llfloaterwebcontent.h"
#include "llfloaterreg.h"
@ -67,6 +68,24 @@ void toast_user_for_facebook_success()
LLNotificationsUtil::add("FacebookConnect", args);
}
LLCore::HttpHeaders::ptr_t get_headers()
{
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
// The DebugSlshareLogTag mechanism is intended to trigger slshare-service
// debug logging. slshare-service is coded to respond to an X-debug-tag
// header by engaging debug logging for that request only. This way a
// developer need not muck with the slshare-service image to engage debug
// logging. Moreover, the value of X-debug-tag is embedded in each such
// log line so the developer can quickly find the log lines pertinent to
// THIS session.
std::string logtag(gSavedSettings.getString("DebugSlshareLogTag"));
if (! logtag.empty())
{
httpHeaders->append("X-debug-tag", logtag);
}
return httpHeaders;
}
///////////////////////////////////////////////////////////////////////////////
//
class LLFacebookConnectHandler : public LLCommandHandler
@ -131,7 +150,7 @@ void LLFacebookConnect::facebookConnectCoro(LLCoros::self& self, std::string aut
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
LLSD putData;
if (!authCode.empty())
@ -148,7 +167,7 @@ void LLFacebookConnect::facebookConnectCoro(LLCoros::self& self, std::string aut
setConnectionState(LLFacebookConnect::FB_CONNECTION_IN_PROGRESS);
LLSD result = httpAdapter->putAndYield(self, httpRequest, getFacebookConnectURL("/connection"), putData, httpOpts);
LLSD result = httpAdapter->putAndYield(self, httpRequest, getFacebookConnectURL("/connection"), putData, httpOpts, get_headers());
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -218,14 +237,14 @@ void LLFacebookConnect::facebookShareCoro(LLCoros::self& self, std::string route
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
setConnectionState(LLFacebookConnect::FB_POSTING);
LLSD result = httpAdapter->postAndYield(self, httpRequest, getFacebookConnectURL(route, true), share, httpOpts);
LLSD result = httpAdapter->postAndYield(self, httpRequest, getFacebookConnectURL(route, true), share, httpOpts, get_headers());
if (testShareStatus(result))
{
@ -241,8 +260,8 @@ void LLFacebookConnect::facebookShareImageCoro(LLCoros::self& self, std::string
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpHeaders::ptr_t httpHeaders(get_headers());
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -268,7 +287,7 @@ void LLFacebookConnect::facebookShareImageCoro(LLCoros::self& self, std::string
std::string contentType = "multipart/form-data; boundary=" + boundary;
httpHeaders->append("Content-Type", contentType.c_str());
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray(), false); //
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray()); //
LLCore::BufferArrayStream body(raw.get());
// *NOTE: The order seems to matter.
@ -310,12 +329,12 @@ void LLFacebookConnect::facebookDisconnectCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
setConnectionState(LLFacebookConnect::FB_DISCONNECTING);
httpOpts->setFollowRedirects(false);
LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getFacebookConnectURL("/connection"), httpOpts);
LLSD result = httpAdapter->deleteAndYield(self, httpRequest, getFacebookConnectURL("/connection"), httpOpts, get_headers());
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -345,13 +364,13 @@ void LLFacebookConnect::facebookConnectedCheckCoro(LLCoros::self& self, bool aut
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
setConnectionState(LLFacebookConnect::FB_CONNECTION_IN_PROGRESS);
httpOpts->setFollowRedirects(false);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/connection", true), httpOpts);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/connection", true), httpOpts, get_headers());
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -394,12 +413,12 @@ void LLFacebookConnect::facebookConnectInfoCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/info", true), httpOpts);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/info", true), httpOpts, get_headers());
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
@ -438,11 +457,11 @@ void LLFacebookConnect::facebookConnectFriendsCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FacebookConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setFollowRedirects(false);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/friends", true), httpOpts);
LLSD result = httpAdapter->getAndYield(self, httpRequest, getFacebookConnectURL("/friends", true), httpOpts, get_headers());
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);

View File

@ -73,7 +73,7 @@ void LLFlickrConnect::flickrConnectCoro(LLCoros::self& self, std::string request
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -163,7 +163,7 @@ void LLFlickrConnect::flickrShareCoro(LLCoros::self& self, LLSD share)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -187,8 +187,8 @@ void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImag
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -214,7 +214,7 @@ void LLFlickrConnect::flickrShareImageCoro(LLCoros::self& self, LLPointer<LLImag
std::string contentType = "multipart/form-data; boundary=" + boundary;
httpHeaders->append("Content-Type", contentType.c_str());
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray(), false); //
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray()); //
LLCore::BufferArrayStream body(raw.get());
// *NOTE: The order seems to matter.
@ -266,7 +266,7 @@ void LLFlickrConnect::flickrDisconnectCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
setConnectionState(LLFlickrConnect::FLICKR_DISCONNECTING);
httpOpts->setFollowRedirects(false);
@ -300,7 +300,7 @@ void LLFlickrConnect::flickrConnectedCoro(LLCoros::self& self, bool autoConnect)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_IN_PROGRESS);
@ -350,7 +350,7 @@ void LLFlickrConnect::flickrInfoCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);

View File

@ -1897,8 +1897,8 @@ void LLGroupMgr::postGroupBanRequestCoro(LLCoros::self& self, std::string url, L
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("groupMembersRequest", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders, false);
LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions, false);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
LLCore::HttpOptions::ptr_t httpOptions(new LLCore::HttpOptions);
httpOptions->setFollowRedirects(false);

View File

@ -139,8 +139,8 @@ LLMaterialMgr::LLMaterialMgr():
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
mHttpRequest = LLCore::HttpRequest::ptr_t(new LLCore::HttpRequest());
mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false);
mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false);
mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
mHttpOptions = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
mHttpPolicy = app_core_http.getPolicy(LLAppCoreHttp::AP_MATERIALS);
mMaterials.insert(std::pair<LLMaterialID, LLMaterialPtr>(LLMaterialID::null, LLMaterialPtr(NULL)));

View File

@ -178,8 +178,8 @@ LLMediaDataClient::LLMediaDataClient(F32 queue_timer_delay, F32 retry_timer_dela
mMaxRoundRobinQueueSize(max_round_robin_queue_size),
mQueueTimerIsRunning(false),
mHttpRequest(new LLCore::HttpRequest()),
mHttpHeaders(new LLCore::HttpHeaders(), false),
mHttpOpts(new LLCore::HttpOptions(), false),
mHttpHeaders(new LLCore::HttpHeaders()),
mHttpOpts(new LLCore::HttpOptions()),
mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID)
{
// *TODO: Look up real Policy ID

View File

@ -73,7 +73,7 @@ void LLTwitterConnect::twitterConnectCoro(LLCoros::self& self, std::string reque
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -163,7 +163,7 @@ void LLTwitterConnect::twitterShareCoro(LLCoros::self& self, std::string route,
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -186,8 +186,8 @@ void LLTwitterConnect::twitterShareImageCoro(LLCoros::self& self, LLPointer<LLIm
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("FlickrConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);
@ -213,7 +213,7 @@ void LLTwitterConnect::twitterShareImageCoro(LLCoros::self& self, LLPointer<LLIm
std::string contentType = "multipart/form-data; boundary=" + boundary;
httpHeaders->append("Content-Type", contentType.c_str());
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray(), false); //
LLCore::BufferArray::ptr_t raw = LLCore::BufferArray::ptr_t(new LLCore::BufferArray()); //
LLCore::BufferArrayStream body(raw.get());
// *NOTE: The order seems to matter.
@ -253,7 +253,7 @@ void LLTwitterConnect::twitterDisconnectCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setFollowRedirects(false);
@ -288,7 +288,7 @@ void LLTwitterConnect::twitterConnectedCoro(LLCoros::self& self, bool autoConnec
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setFollowRedirects(false);
setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS);
@ -337,7 +337,7 @@ void LLTwitterConnect::twitterInfoCoro(LLCoros::self& self)
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("TwitterConnect", httpPolicy));
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions, false);
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
httpOpts->setWantHeaders(true);
httpOpts->setFollowRedirects(false);

View File

@ -1342,7 +1342,7 @@ void LLViewerMedia::openIDSetupCoro(LLCoros::self& self, std::string openidUrl,
httpHeaders->append(HTTP_OUT_HEADER_ACCEPT, "*/*");
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, "application/x-www-form-urlencoded");
LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray, false);
LLCore::BufferArray::ptr_t rawbody(new LLCore::BufferArray);
LLCore::BufferArrayStream bas(rawbody.get());
bas << std::noskipws << openidToken;

View File

@ -202,7 +202,7 @@ void LLWebProfile::uploadImageCoro(LLCoros::self& self, LLPointer<LLImageFormatt
/*static*/
LLCore::BufferArray::ptr_t LLWebProfile::buildPostData(const LLSD &data, LLPointer<LLImageFormatted> &image, const std::string &boundary)
{
LLCore::BufferArray::ptr_t body(new LLCore::BufferArray, false);
LLCore::BufferArray::ptr_t body(new LLCore::BufferArray);
LLCore::BufferArrayStream bas(body.get());
// *NOTE: The order seems to matter.

View File

@ -357,7 +357,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
}
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions(), false);
httpOpts = LLCore::HttpOptions::ptr_t(new LLCore::HttpOptions());
httpOpts->setTimeout(40L);
@ -368,7 +368,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
httpOpts->setSSLVerifyHost( vefifySSLCert ? 2 : 0);
// LLRefCounted starts with a 1 ref, so don't add a ref in the smart pointer
httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders(), false);
httpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders());
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
@ -376,7 +376,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
//This might help with bug #503 */
//httpOpts->setDNSCacheTimeout(-1);
LLCore::BufferArray::ptr_t body = LLCore::BufferArray::ptr_t(new LLCore::BufferArray(), false);
LLCore::BufferArray::ptr_t body = LLCore::BufferArray::ptr_t(new LLCore::BufferArray());
// TODO: See if there is a way to serialize to a preallocated buffer I'm
// not fond of the copy here.