aio-libs / aio-libs/aiohttp-session

Decoding data is not nesessary on some Redis configurations

Đang mở
#294 15 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
245
Fork
91
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
4

Mô tả

What reason for this line here?
https://github.com/aio-libs/aiohttp-session/blob/606cacafc47383f99cff39aba31f20bb5db3b879/aiohttp_session/redis_storage.py#L53

I want to store some bytes in session. Changed encoder ` setup_session(app, RedisStorage(redis_pool, encoder=pickle.dumps, decoder=pickle.loads))`. And I have error on getting session:
```

data = data.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

```
It also breakes `msgpack`

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.