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

Nil as table index #43

Open
golgote opened this issue May 21, 2015 · 1 comment
Open

Nil as table index #43

golgote opened this issue May 21, 2015 · 1 comment

Comments

@golgote
Copy link

golgote commented May 21, 2015

If a key in a table is nil, the unpack will report an error. But it seems possible to create such an array in msgpack so maybe the Lua unpacker should just ignore it since it cannot be used this way.

Initially for me, the problems comes from the PHP msgpack extension that doesn't serialize sessions correctly and adds a nil indexed key in the array. I was trying to use redis as a session store to share sessions between Openresty (Lua) and PHP (I could do the same with Nodejs for example). The PHP unpack just ignores the nil indexed key/value. See the following issue for some details about the problem.
msgpack/msgpack-php#50

There is the same issue in the Lua MessagePack implementation as described here:
https://github.com/fperrad/lua-MessagePack/issues/14

@rybakit
Copy link

rybakit commented Jan 10, 2016

@golgote I had a similar issue msgpack/msgpack-php#60 which was fixed. Maybe it also fixes your use case?

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

2 participants