Skip to content

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

Description

@yourabi

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions