mirror of
https://github.com/fluencelabs/redis
synced 2025-06-19 04:01:22 +00:00
RESP3: allow HELLO to be used with version = 2.
This commit is contained in:
@ -2034,13 +2034,6 @@ void helloCommand(client *c) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Switching to protocol v2 is not allowed. But we send a specific
|
||||
* error message in this case. */
|
||||
if (ver == 2) {
|
||||
addReplyError(c,"Switching to RESP version 2 is not allowed.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* At this point we need to be authenticated to continue. */
|
||||
if (!c->authenticated) {
|
||||
addReplyError(c,"-NOAUTH HELLO must be called with the client already "
|
||||
@ -2050,8 +2043,8 @@ void helloCommand(client *c) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Let's switch to RESP3 mode. */
|
||||
c->resp = 3;
|
||||
/* Let's switch to the specified RESP mode. */
|
||||
c->resp = ver;
|
||||
addReplyMapLen(c,7);
|
||||
|
||||
addReplyBulkCString(c,"server");
|
||||
|
Reference in New Issue
Block a user