antirez / antirez/lua-cmsgpack

Nil as table index

未关闭
#43 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C
星标
383
派生
122
PR 合并指标
30 天内没有已合并 PR

描述

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.
https://github.com/msgpack/msgpack-php/issues/50

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。