On 12/26/06, Beegee <[EMAIL PROTECTED]> wrote: ...
> Perhaps there is a bug in locale.py. Should: > > patch_vary_headers(response, ('Accept-Language',)) > > perhaps be: > > patch_vary_headers(response, ('Content-Language',))
...
I made the change mentioned above. But, it simply does NOT work! Whenever I enable global caching I can NOT switch between languages anymore. Only one page is saved in the cache!
I apologize for mixing you up. The vary header is "the set of request-header fields that fully determines, while the response is fresh, whether a cache is permitted to use the response to reply to a subsequent request without revalidation". (rfc2616, 14.44 Vary) Which is to say, Accept-Language is the appropriate value to place in the Vary header, since that is the request-header field we're interested in varying on, *not* Content-Language. Even so, have you verified that your browsers are sending Accept-Language as expected? Second, are you using mod_python or wsgi? I'm asking because the headers django.util.cache.learn_cache_key depends on are expected to be munged into request.META on round-trip. I do see that munging occurring in django.core.handlers.modpython, but not in django.core.handlers.wsgi. I haven't tested that here-- I'm not set up for trunk testing or i18n, but if you're using wsgi, this may be your bug... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---