#32844: Cached pages can crash on 3.1 to 3.2 upgrade
------------------------------------------+------------------------
               Reporter:  Iuri de Silvio  |          Owner:  nobody
                   Type:  Uncategorized   |         Status:  new
              Component:  Uncategorized   |        Version:  3.2
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 My cached page from 3.1 crashes because I have a middleware setting a
 header.

 Because cache_page do a pickle caching, we have a 3.1 JsonResponse running
 on 3.2, without the new headers feature.

 {{{
 AttributeError: 'JsonResponse' object has no attribute 'headers'
   File "django/core/handlers/exception.py", line 47, in inner
     response = get_response(request)
   File "commons/middleware.py", line 44, in __call__
     response['X-Current-Version'] = VERSION
   File "django/http/response.py", line 172, in __setitem__
     self.headers[header] = value
 }}}

 Docs could provide some help about this, the fix should be easy cleaning
 specific cache or using `CACHE_MIDDLEWARE_KEY_PREFIX`. that is
 unfortunately broken.

 https://code.djangoproject.com/ticket/32841

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32844>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.fbe47cc6d3bc0dfac94b63af501652e7%40djangoproject.com.

Reply via email to