mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Handle more Redis RESP3 protocol pieces
This passes the "minimum protocol version" along in the reply and adds support for attributes, which were added relatively recently.
This commit is contained in:
parent
b34d3ff2f0
commit
64443e5e5a
13 changed files with 115 additions and 30 deletions
|
@ -296,6 +296,12 @@ event Redis::reply(c: connection, data: ReplyData)
|
|||
if ( ! c?$redis_state )
|
||||
make_new_state(c);
|
||||
|
||||
if ( data$min_protocol_version == 3 )
|
||||
{
|
||||
c$redis_state$resp_version = RESP3;
|
||||
c$redis_state$subscribed_mode = F;
|
||||
}
|
||||
|
||||
if ( c$redis_state$subscribed_mode )
|
||||
{
|
||||
event server_push(c, data);
|
||||
|
|
|
@ -60,7 +60,12 @@ export {
|
|||
|
||||
## A generic Redis reply from the client.
|
||||
type ReplyData: record {
|
||||
value: string &log &optional;
|
||||
## The RESP3 attributes applied to this, if any
|
||||
attributes: string &optional;
|
||||
## The string version of the reply data
|
||||
value: string &log;
|
||||
## The minimum RESP version that supports this reply type
|
||||
min_protocol_version: count;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue