Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
viplifes opened this issue Mar 31, 2018 · 1 comment

Comments

@viplifes
Copy link

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!

@viplifes
Copy link
Author

In msgpack-erlang version 0.3.6, everything works well with Redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant