diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-05-05 15:51:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-05 15:51:49 -0700 |
| commit | bbce410f87643d8bdd2870aa74fe208a74766dfb (patch) | |
| tree | 13e05998311f4124bbfe19e363d16a18e2613591 /indra/llmessage/llcorehttputil.cpp | |
| parent | 65b9b2cb5cde2c344da51a7b677c1b99591d8ad3 (diff) | |
| parent | a453db20bb49193806fb0cafeb4d50db4a16abe4 (diff) | |
Merge pull request #5739 from secondlife/rider/defs_cap
Get pregenerated config files from the simulator cap and make them available through the websocket.
Diffstat (limited to 'indra/llmessage/llcorehttputil.cpp')
| -rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index b24e5e4fcc..f18af1f18e 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -39,7 +39,7 @@ #include "llfilesystem.h" #include "message.h" // for getting the port - +#include "llstl.h" using namespace LLCore; @@ -112,15 +112,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; @@ -409,28 +411,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 @@ -955,7 +935,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, |
