Ticket #18191: ignore_accept_language.diff
File ignore_accept_language.diff, 851 bytes (added by , 13 years ago) |
---|
-
django/utils/cache.py
234 234 if cache is None: 235 235 cache = get_cache(settings.CACHE_MIDDLEWARE_ALIAS) 236 236 if response.has_header('Vary'): 237 headerlist = ['HTTP_'+header.upper().replace('-', '_') 238 for header in cc_delim_re.split(response['Vary'])] 237 headerlist = [] 238 for header in cc_delim_re.split(response['Vary']): 239 header = header.upper().replace('-', '_') 240 if header != 'ACCEPT_LANGUAGE': 241 headerlist.append('HTTP_' + header) 239 242 cache.set(cache_key, headerlist, cache_timeout) 240 243 return _generate_cache_key(request, request.method, headerlist, key_prefix) 241 244 else: