diff options
Diffstat (limited to 'indra/llmessage')
-rwxr-xr-x | indra/llmessage/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 20 | ||||
-rw-r--r-- | indra/llmessage/llcorehttputil.h | 55 |
3 files changed, 43 insertions, 34 deletions
diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index ba6e9d3939..fc51d147a6 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -261,7 +261,7 @@ if (LL_TESTS) ${GOOGLEMOCK_LIBRARIES} ) - LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}") + #LL_ADD_INTEGRATION_TEST(llavatarnamecache "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llhost "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llpartdata "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llxfer_file "" "${test_libs}") diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index ac1c2f8e58..05d74a45a2 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -102,8 +102,8 @@ HttpHandle requestPostWithLLSD(HttpRequest * request, HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - HttpOptions * options, - HttpHeaders * headers, + const HttpOptions::ptr_t &options, + const HttpHeaders::ptr_t &headers, HttpHandler * handler) { HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); @@ -129,8 +129,8 @@ HttpHandle requestPutWithLLSD(HttpRequest * request, HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - HttpOptions * options, - HttpHeaders * headers, + const HttpOptions::ptr_t &options, + const HttpHeaders::ptr_t &headers, HttpHandler * handler) { HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); @@ -155,8 +155,8 @@ HttpHandle requestPatchWithLLSD(HttpRequest * request, HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - HttpOptions * options, - HttpHeaders * headers, + const HttpOptions::ptr_t &options, + const HttpHeaders::ptr_t &headers, HttpHandler * handler) { HttpHandle handle(LLCORE_HTTP_HANDLE_INVALID); @@ -286,7 +286,7 @@ void HttpCoroHandler::buildStatusEntry(LLCore::HttpResponse *response, LLCore::H writeStatusCodes(status, response->getRequestURL(), httpresults); LLSD httpHeaders = LLSD::emptyMap(); - LLCore::HttpHeaders * hdrs = response->getHeaders(); + LLCore::HttpHeaders::ptr_t hdrs = response->getHeaders(); if (hdrs) { @@ -689,7 +689,7 @@ LLSD HttpCoroutineAdapter::postAndYield_(LLCore::HttpRequest::ptr_t &request, // The HTTPCoroHandler does not self delete, so retrieval of a the contained // pointer from the smart pointer is safe in this case. LLCore::HttpHandle hhandle = request->requestPost(mPolicyId, mPriority, url, rawbody.get(), - options.get(), headers.get(), handler.get()); + options, headers, handler.get()); if (hhandle == LLCORE_HTTP_HANDLE_INVALID) { @@ -782,7 +782,7 @@ LLSD HttpCoroutineAdapter::getAndYield_(LLCore::HttpRequest::ptr_t &request, // The HTTPCoroHandler does not self delete, so retrieval of a the contained // pointer from the smart pointer is safe in this case. LLCore::HttpHandle hhandle = request->requestGet(mPolicyId, mPriority, - url, options.get(), headers.get(), handler.get()); + url, options, headers, handler.get()); if (hhandle == LLCORE_HTTP_HANDLE_INVALID) { @@ -817,7 +817,7 @@ LLSD HttpCoroutineAdapter::deleteAndYield_(LLCore::HttpRequest::ptr_t &request, // The HTTPCoroHandler does not self delete, so retrieval of a the contained // pointer from the smart pointer is safe in this case. LLCore::HttpHandle hhandle = request->requestDelete(mPolicyId, mPriority, - url, options.get(), headers.get(), handler.get()); + url, options, headers, handler.get()); if (hhandle == LLCORE_HTTP_HANDLE_INVALID) { diff --git a/indra/llmessage/llcorehttputil.h b/indra/llmessage/llcorehttputil.h index cf35177e48..999fd5f90b 100644 --- a/indra/llmessage/llcorehttputil.h +++ b/indra/llmessage/llcorehttputil.h @@ -107,25 +107,25 @@ std::string responseToString(LLCore::HttpResponse * response); /// a now-useless HttpHandler object. /// LLCore::HttpHandle requestPostWithLLSD(LLCore::HttpRequest * request, - LLCore::HttpRequest::policy_t policy_id, - LLCore::HttpRequest::priority_t priority, - const std::string & url, - const LLSD & body, - LLCore::HttpOptions * options, - LLCore::HttpHeaders * headers, - LLCore::HttpHandler * handler); + LLCore::HttpRequest::policy_t policy_id, + LLCore::HttpRequest::priority_t priority, + const std::string & url, + const LLSD & body, + const LLCore::HttpOptions::ptr_t &options, + const LLCore::HttpHeaders::ptr_t &headers, + LLCore::HttpHandler * handler); inline LLCore::HttpHandle requestPostWithLLSD(LLCore::HttpRequest::ptr_t & request, LLCore::HttpRequest::policy_t policy_id, LLCore::HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t & options, - LLCore::HttpHeaders::ptr_t & headers, + const LLCore::HttpOptions::ptr_t & options, + const LLCore::HttpHeaders::ptr_t & headers, LLCore::HttpHandler * handler) { return requestPostWithLLSD(request.get(), policy_id, priority, - url, body, options.get(), headers.get(), handler); + url, body, options, headers, handler); } inline LLCore::HttpHandle requestPostWithLLSD(LLCore::HttpRequest::ptr_t & request, @@ -135,8 +135,11 @@ inline LLCore::HttpHandle requestPostWithLLSD(LLCore::HttpRequest::ptr_t & reque const LLSD & body, LLCore::HttpHandler * handler) { + LLCore::HttpOptions::ptr_t options; + LLCore::HttpHeaders::ptr_t headers; + return requestPostWithLLSD(request.get(), policy_id, priority, - url, body, NULL, NULL, handler); + url, body, options, headers, handler); } @@ -161,8 +164,8 @@ LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest * request, LLCore::HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - LLCore::HttpOptions * options, - LLCore::HttpHeaders * headers, + const LLCore::HttpOptions::ptr_t &options, + const LLCore::HttpHeaders::ptr_t &headers, LLCore::HttpHandler * handler); inline LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest::ptr_t & request, @@ -170,12 +173,12 @@ inline LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest::ptr_t & reques LLCore::HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t & options, - LLCore::HttpHeaders::ptr_t & headers, + const LLCore::HttpOptions::ptr_t & options, + const LLCore::HttpHeaders::ptr_t & headers, LLCore::HttpHandler * handler) { return requestPutWithLLSD(request.get(), policy_id, priority, - url, body, options.get(), headers.get(), handler); + url, body, options, headers, handler); } inline LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest::ptr_t & request, @@ -185,8 +188,11 @@ inline LLCore::HttpHandle requestPutWithLLSD(LLCore::HttpRequest::ptr_t & reques const LLSD & body, LLCore::HttpHandler * handler) { + LLCore::HttpOptions::ptr_t options; + LLCore::HttpHeaders::ptr_t headers; + return requestPutWithLLSD(request.get(), policy_id, priority, - url, body, NULL, NULL, handler); + url, body, options, headers, handler); } /// Issue a standard HttpRequest::requestPatch() call but using @@ -210,8 +216,8 @@ LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest * request, LLCore::HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - LLCore::HttpOptions * options, - LLCore::HttpHeaders * headers, + const LLCore::HttpOptions::ptr_t &options, + const LLCore::HttpHeaders::ptr_t &headers, LLCore::HttpHandler * handler); inline LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest::ptr_t & request, @@ -219,12 +225,12 @@ inline LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest::ptr_t & requ LLCore::HttpRequest::priority_t priority, const std::string & url, const LLSD & body, - LLCore::HttpOptions::ptr_t & options, - LLCore::HttpHeaders::ptr_t & headers, + const LLCore::HttpOptions::ptr_t & options, + const LLCore::HttpHeaders::ptr_t & headers, LLCore::HttpHandler * handler) { return requestPatchWithLLSD(request.get(), policy_id, priority, - url, body, options.get(), headers.get(), handler); + url, body, options, headers, handler); } inline LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest::ptr_t & request, @@ -234,8 +240,11 @@ inline LLCore::HttpHandle requestPatchWithLLSD(LLCore::HttpRequest::ptr_t & requ const LLSD & body, LLCore::HttpHandler * handler) { + LLCore::HttpOptions::ptr_t options; + LLCore::HttpHeaders::ptr_t headers; + return requestPatchWithLLSD(request.get(), policy_id, priority, - url, body, NULL, NULL, handler); + url, body, options, headers, handler); } //========================================================================= |