Permalink
Browse files

Some URLs with UTF8 characters break the cache key generation

  • Loading branch information...
1 parent cc53799 commit 60b1de5c68b2a87778778709c8793d03dfa32c69 @lmorchard lmorchard committed Apr 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 apps/homesnippets/models.py
@@ -30,7 +30,7 @@
def _key_from_client(args):
plain = '|'.join(['%s=%s'%(k,v) for k,v in args.items()])
- return hashlib.md5(plain).hexdigest()
+ return hashlib.md5(plain.encode('UTF-8')).hexdigest()
class ClientMatchRuleManager(models.Manager):

0 comments on commit 60b1de5

Please sign in to comment.