Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache: Unicode URI will cause exception when creating cache key #1

Open
yourabi opened this issue Mar 11, 2010 · 0 comments
Open

Cache: Unicode URI will cause exception when creating cache key #1

yourabi opened this issue Mar 11, 2010 · 0 comments

Comments

@yourabi
Copy link
Owner

yourabi commented Mar 11, 2010

If a URI is requested with unicode characters a UnicodeEncodeError is thrown

backends.py lines 131 (read)
versioned_key = hashlib.md5(key_version + "_" + key).hexdigest()

HttpBackend line 70 (fetch)
cache_tuple = self.cache.read(self.request.source)

Example (Before and After django smart_str)
Alton Auto Daylight Savings ™ Wall Clock
Alton Auto Daylight Savings %E2%84%A2 Wall Clock
Alton Auto Daylight Savings \xe2\x84\xa2 Wall Clock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant