Ticket #7046: 7046.diff

File 7046.diff, 951 bytes (added by Simon Greenhill, 7 years ago)
  • django_src/django/middleware/http.py

     
    1919                # Setting the status is enough here. The response handling path
    2020                # automatically removes content for this status code (in
    2121                # http.conditional_content_removal()).
    22                 response.status = 304
     22                response.status_code = 304
    2323
    2424        if response.has_header('Last-Modified'):
    2525            if_modified_since = request.META.get('HTTP_IF_MODIFIED_SINCE', None)
    2626            if if_modified_since == response['Last-Modified']:
    2727                # Setting the status code is enough here (same reasons as
    2828                # above).
    29                 response.status = 304
     29                response.status_code = 304
    3030
    3131        return response
    3232
Back to Top