vapor / redis

Vapor provider for RediStack

Repository from Github https://github.comvapor/redisRepository from Github https://github.comvapor/redis

Unable to handle binary data

perduamour opened this issue · 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")
    }

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

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 :)