From 35f2cd6e59d616726f5e86b2fec634b2f191d8fc Mon Sep 17 00:00:00 2001 From: wangdl Date: Sat, 6 Jun 2026 15:01:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20SSE=20charset=20utf-8=20+=20=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=AB=AF=20charset=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- src/modules/rag-chat/rag-chat.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rag-chat/rag-chat.controller.ts b/src/modules/rag-chat/rag-chat.controller.ts index 2a98c0a..6a2f1ee 100644 --- a/src/modules/rag-chat/rag-chat.controller.ts +++ b/src/modules/rag-chat/rag-chat.controller.ts @@ -38,7 +38,7 @@ export class RagChatController { @Post('sessions/:id/stream') @ApiOperation({ summary: '发送消息(SSE 流式,支持思考过程)' }) async sendMessageStream(@CurrentUser() user: UserPayload, @Param('id') id: string, @Body() dto: { content: string }, @Res() res: Response) { - res.setHeader('Content-Type', 'text/event-stream'); + res.setHeader('Content-Type', 'text/event-stream; charset=utf-8'); res.setHeader('Cache-Control', 'no-cache'); res.setHeader('Connection', 'keep-alive'); res.setHeader('X-Accel-Buffering', 'no');