You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 4, 2022. It is now read-only.
It seems hashlib.md5 can't handle the non-ascii (Chinese) characters when it tries to derive a cache key from the incoming URL. Would it be as simple as adding ".encode('utf-8')" to the request_path variable?
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'm afraid I don't have time to try this now, but what you're suggesting makes sense and sounds worth pursuing.
Are you able to try it out? If you are, and it works, please do send me a patch or a pull request that fixes (specificially) this issue and I'll merge it.
Cheers
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a URL like this that needs to be cached "/search/快递/" - i.e. Chinese characters in the URL. It causes a UnicodeEncodeError here:
https://github.com/torchbox/django-nginx-memcache/blob/master/nginx_memcache/cache.py#L80-L94
It seems hashlib.md5 can't handle the non-ascii (Chinese) characters when it tries to derive a cache key from the incoming URL. Would it be as simple as adding ".encode('utf-8')" to the request_path variable?
The text was updated successfully, but these errors were encountered: