Skip to content

Conflict using Redis and msgpack-erlang with {spec, old} - {error,incomplete} #78

@viplifes

Description

@viplifes

Erlang/OTP 20 Eshell V9.3
msgpack-erlang version 0.7.0

If you encode data with old spec
msgpack:pack(List, [{spec, old}]).
Then write the data in Redis and apply to the data cmsgpack.unpack and cmsgpack.pack
Then decode the data in erlang
msgpack:unpack(Binary, [{spec, old}]).
We can receive {error, incomplete}

The old specification msgpack https://github.com/msgpack/msgpack/blob/master/spec-old.md does not use HEX 0xd9

But Redis cmsgpack.pack and cmsgpack.unpack allow the use of 0xd9
https://github.com/antirez/redis/blob/unstable/deps/lua/src/lua_cmsgpack.c#L182
https://github.com/antirez/redis/blob/unstable/deps/lua/src/lua_cmsgpack.c#L691

Now if use cmsgpack.pack and cmsgpack.unpack in Redis, you get {error, incomplete} in erlang.

Is it possible for the old specification to optionally allow the use of 0xd9?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions