summaryrefslogtreecommitdiff
path: root/indra/llmessage/llcorehttputil.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-08-25 13:21:03 -0400
committerGitHub <noreply@github.com>2026-08-25 13:21:03 -0400
commitf6f5cd0f888dd8ec53821aa4f26e307b51465da0 (patch)
treeaddb875c9bc2b217d39d7d6fd4e4e0a5ea333745 /indra/llmessage/llcorehttputil.cpp
parent82caf452cdaa59357a25d0844afe0012419beed2 (diff)
parent2e9c387fee881022aec13d5c85f901539683c18f (diff)
Merge pull request #3537 from secondlife/project/lua_editor
Alpha Viewer: Lua editor
Diffstat (limited to 'indra/llmessage/llcorehttputil.cpp')
-rw-r--r--indra/llmessage/llcorehttputil.cpp33
1 files changed, 6 insertions, 27 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index 647064f607..7e619d45e3 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -40,7 +40,7 @@
#include "workqueue.h"
#include "message.h" // for getting the port
-
+#include "llstl.h"
using namespace LLCore;
@@ -113,15 +113,17 @@ bool responseToLLSD(HttpResponse * response, bool log, LLSD & out_llsd)
{
// Convert response to LLSD
BufferArray * body(response->getBody());
- if (!body || !body->size())
+ size_t body_size(body ? body->size() : 0);
+ if (!body || !body_size)
{
return false;
}
LLCore::BufferArrayStream bas(body);
LLSD body_llsd;
- S32 parse_status(LLSDSerialize::fromXML(body_llsd, bas, log));
- if (LLSDParser::PARSE_FAILURE == parse_status){
+
+ if (!LLSDSerialize::deserialize(body_llsd, bas, body_size))
+ {
return false;
}
out_llsd = body_llsd;
@@ -467,28 +469,6 @@ LLSD HttpCoroLLSDHandler::handleSuccess(LLCore::HttpResponse * response, LLCore:
result = parseBody(response, success);
-#if 0
- bool parsed = !((response->getBodySize() == 0) ||
- !LLCoreHttpUtil::responseToLLSD(response, emit_parse_errors, result));
-
- if (!parsed)
- {
- // Only emit a warning if we failed to parse when 'content-type' == 'application/llsd+xml'
- LLCore::HttpHeaders::ptr_t headers(response->getHeaders());
- const std::string *contentType = (headers) ? headers->find(HTTP_IN_HEADER_CONTENT_TYPE) : NULL;
-
- if (contentType && (HTTP_CONTENT_LLSD_XML == *contentType))
- {
- std::string thebody = LLCoreHttpUtil::responseToString(response);
- LL_WARNS("CoreHTTP") << "Failed to deserialize . " << response->getRequestURL() << " [status:" << response->getStatus().toString() << "] "
- << " body: " << thebody << LL_ENDL;
-
- // Replace the status with a new one indicating the failure.
- status = LLCore::HttpStatus(499, "Failed to deserialize LLSD.");
- }
- }
-#endif
-
if (!success)
{
#if 1
@@ -1013,7 +993,6 @@ LLSD HttpCoroutineAdapter::getJsonAndSuspend(LLCore::HttpRequest::ptr_t request,
return getAndSuspend_(request, url, options, headers, httpHandler);
}
-
LLSD HttpCoroutineAdapter::getAndSuspend_(LLCore::HttpRequest::ptr_t &request,
const std::string & url,
LLCore::HttpOptions::ptr_t &options, LLCore::HttpHeaders::ptr_t &headers,