From 3637470deb6bb72f85ed87a5c6ee2324a434e606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delucchi?= Date: Fri, 31 May 2024 20:37:22 +0200 Subject: [PATCH] fix(resp): corrige la longueur de BulkString lors de l'encodage --- src/Shared/Resp.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Shared/Resp.cs b/src/Shared/Resp.cs index 0a58a52..a26b602 100644 --- a/src/Shared/Resp.cs +++ b/src/Shared/Resp.cs @@ -47,8 +47,7 @@ public class BulkString : Item public override string Encode() { - int len = Encoding.UTF8.GetByteCount(Data); - return $"${len}\r\n{Data}\r\n"; + return $"${Data.Length}\r\n{Data}\r\n"; } public override string ToString() => Data;