yykaue opened a new pull request, #6930:
URL: https://github.com/apache/shenyu/pull/6930

   Fixes #6752.
   
   `SseEventFormatter` previously used the platform-default charset when 
converting SSE events and comments to bytes. On systems where the default 
charset is not UTF-8, non-ASCII MCP payloads could be corrupted.
   
   Since Server-Sent Events are UTF-8 text streams, this PR:
   
   - Uses `StandardCharsets.UTF_8` when encoding SSE events.
   - Uses `StandardCharsets.UTF_8` when encoding SSE comments.
   - Adds byte-level regression tests covering non-ASCII JSON event data and 
comments.
   
   ## Verification
   
   - The regression tests fail before the fix when executed with an ISO-8859-1 
default charset.
   - The same tests pass after the fix in a non-UTF-8 environment.
   - Relevant tests, compilation, and Checkstyle pass.
   
   @Aias00 Could you please review this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to