vapor/redis

Unable to handle binary data

perduamour opened this issue · 3 comments

The following codes won't work, redis server can't receive the proper command:

    let byteArray: [UInt8] = [0x10, 0xAC]

    let data = Data(bytes: byteArray)

    app.withPooledConnection(to: .redis) { redis in
        return redis.rpush([RedisData.bulkString(data)], into: "1")
    }

but the following works:

    let byteArray: [UInt8] = [0x10]

    let data = Data(bytes: byteArray)

    app.withPooledConnection(to: .redis) { redis in
        return redis.rpush([RedisData.bulkString(data)], into: "1")
    }
vzsg commented

I think #113 will fix that. @tanner0101 could you please review that?

vkill commented

Yes, #113 can fix it.

#113 has been merged. @perduamour update to 3.1.0 using swift package update. The problem should be fixed. Thanks :)