From cc17bc324c8db93e2d719af0712be1853215ea12 Mon Sep 17 00:00:00 2001 From: meta-life Date: Mon, 23 May 2022 16:49:00 +0800 Subject: [PATCH] protocol-spec.md: fix "hello" and "world" lengths (#1839) --- docs/reference/protocol-spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/protocol-spec.md b/docs/reference/protocol-spec.md index 8047309e20..086288a542 100644 --- a/docs/reference/protocol-spec.md +++ b/docs/reference/protocol-spec.md @@ -159,7 +159,7 @@ Bulk Strings are encoded in the following way: So the string "hello" is encoded as follows: - "$6\r\nhello\r\n" + "$5\r\nhello\r\n" An empty string is encoded as: @@ -198,7 +198,7 @@ So an empty Array is just the following: While an array of two RESP Bulk Strings "hello" and "world" is encoded as: - "*2\r\n$3\r\nhello\r\n$3\r\nworld\r\n" + "*2\r\n$5\r\nhello\r\n$5\r\nworld\r\n" As you can see after the `*CRLF` part prefixing the array, the other data types composing the array are just concatenated one after the other.