antirez / RESP3

RESP protocol V3 repository. Contains the specification, and other related resource
229 stars 41 forks source link

Verbatim string format #2

Closed seppo0010 closed 6 years ago

seppo0010 commented 6 years ago

I find that the Verbatim string has a fixed-size header of 4 bytes with the type and a colon is inconsistent with the rest of the spec. I also think it affect readability that the header has no visual separation to the first word of the string. I think it would be better if it uses the <CR><LF> separator.

For example

=16<CR><LF>
txt<CR><LF>
Some string<CR><LF>
antirez commented 6 years ago

It was like that and then I changed it today, but you are right, I'll revert to the old form that is the one you proposed.

antirez commented 6 years ago

@seppo0010 no sorry, to a closer look I think it's ok as it is, the reason why I changed it today was because the four bytes XXX: are included in the payload of the original string. So this is not protocol, it is just an agreement about the receiver of a verbatim string and the generator of it. So indeed it does not look correct to mix the protocol format with this convention.