From ff16fac75421430b617bee25353fa65f8c16cddd Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Tue, 3 Jun 2025 17:52:37 +0700 Subject: [PATCH] QFIX: Rpc response body size (#9160) Signed-off-by: Andrey Sobolev --- dev/tool/src/index.ts | 2 +- pods/server/src/rpc.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/tool/src/index.ts b/dev/tool/src/index.ts index d3df922fff..2f88e5939b 100644 --- a/dev/tool/src/index.ts +++ b/dev/tool/src/index.ts @@ -1677,7 +1677,7 @@ export function devTool ( name = systemAccountUuid } const wsByUrl = await db.workspace.findOne({ url: workspace }) - const account = await db.socialId.findOne({ key: name }) + const account = await db.socialId.findOne({ value: name }) console.log( generateToken(account?.personUuid ?? (name as AccountUuid), wsByUrl?.uuid ?? (workspace as WorkspaceUuid), { ...(opt.admin ? { admin: 'true' } : {}) diff --git a/pods/server/src/rpc.ts b/pods/server/src/rpc.ts index 9cbfed63db..f6907fd912 100644 --- a/pods/server/src/rpc.ts +++ b/pods/server/src/rpc.ts @@ -80,13 +80,13 @@ async function sendJson ( extraHeaders?: OutgoingHttpHeaders ): Promise { // Calculate ETag - let body: any = JSON.stringify(result, rpcJSONReplacer) + let body: Buffer = Buffer.from(JSON.stringify(result, rpcJSONReplacer), 'utf8') const etag = createHash('sha256').update(body).digest('hex') const headers: OutgoingHttpHeaders = { ...(extraHeaders ?? {}), ...keepAliveOptions, - 'Content-Type': 'application/json', + 'Content-Type': 'application/json; charset=utf-8', 'Cache-Control': 'no-cache', ETag: etag }