Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 176 additions & 60 deletions doc/external-editor-json-rpc.md

Large diffs are not rendered by default.

33 changes: 6 additions & 27 deletions indra/llmessage/llcorehttputil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "llfilesystem.h"

#include "message.h" // for getting the port

#include "llstl.h"

using namespace LLCore;

Expand Down Expand Up @@ -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);
Comment on lines 111 to +115

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in d3fa87f. Added (void)log; to suppress the unused-parameter warning and updated the comment to accurately describe that LLSDSerialize::deserialize() handles XML, binary, and notation LLSD encodings (not just XML).

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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion indra/llmessage/llcorehttputil.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ class HttpCoroutineAdapter
headers);
}


/// Execute a DELETE transaction on the supplied URL and yield execution of
/// the coroutine until a result is available.
///
Expand Down
1 change: 0 additions & 1 deletion indra/newview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,6 @@ set(viewer_APPSETTINGS_FILES
app_settings/std_bump.ini
app_settings/toolbars.xml
app_settings/trees.xml
app_settings/types_lua_default.xml

@tapple tapple Apr 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hit this assert when I tried pressing edit again on a script already open in vscode

[2026-04-29 21:50:03] [frame_payload] Payload Bytes:
[0] (147) [1] {"id":1,"jsonrpc":"2.0","result":{"message":"Script already subscribed","script_id":"b9a3098060694bd0dc3b8174bf41f8ad","status":3,"success":false}}

[2026-04-29 21:50:03] [frame_header] Dispatching write containing 1 message(s) containing 2 header bytes and 79 payload bytes
[2026-04-29 21:50:03] [frame_header] Header Bytes:
[0] (2) 81 4F

[2026-04-29 21:50:03] [frame_payload] Payload Bytes:
[0] (79) [1] {"id":2,"jsonrpc":"2.0","result":{"id":"9095b976-6535-080c-f78e-de69f79c1fa9"}}

2026-04-30T04:50:03Z ERROR #LlsdToJson# llcommon/llsdjson.cpp(135) LlsdToJson : Unsupported conversion to JSON from LLSD type (8).

@tapple tapple Apr 30, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testing on fedora linux. unsure whether I should build viewer with or without DebInfo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll run that test case. Thanks for the catch.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't reproduce this again

app_settings/viewerart.xml
app_settings/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
Expand Down
Loading
Loading