﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5176	Bug in django.utils.cache._generate_cache_key(request, headerlist, key_prefix)	Eratothene	nobody	"Checked on latest SVN[[BR]]

If the !Order of middlewares goes like this:[[BR]]
'django.middleware.cache.!CacheMiddleware',[[BR]]
'django.contrib.sessions.middleware.!SessionMiddleware', [[BR]]
[[BR]]


And I want the order to be exactly like this, because !SessionMiddleware adds Vary on Cookie where appropriate.
Django dies on every request, which actually varyies on cookies. Generate_cache_key tries to get cookie into the cache key, what
is exactly what I want, but fails as it expects string not a !SimpleCookie. Path is trivial though..

{{{
  File ""/usr/local/lib/python2.5/site-packages/django/middleware/cache.py"", line 82, in process_response
    cache_key = learn_cache_key(request, response, self.cache_timeout, self.key_prefix)
  File ""/usr/local/lib/python2.5/site-packages/django/utils/cache.py"", line 163, in learn_cache_key
    return _generate_cache_key(request, headerlist, key_prefix)
  File ""/usr/local/lib/python2.5/site-packages/django/utils/cache.py"", line 120, in _generate_cache_key
    ctx.update(value)
TypeError: update() argument 1 must be string or read-only buffer, not SimpleCookie
}}}


    "		closed	Core (Cache system)	dev		fixed	cache session testclient	ryszard.szopa+django@… sciyoshi@… karld@… lcordier@… charpentier.johan@… me@… andy@… paulswartz@…	Accepted	1	0	0	1	0	0
