From 94beaa6ebbad080786a60944086a7bb95451c8ad Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 30 Jun 2008 07:03:58 +0000 Subject: [PATCH] Fixed #7046 -- set the response status code correctly in ConditionalGetMiddleware. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7793 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/middleware/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/middleware/http.py b/django/middleware/http.py index 2ef46c6b61..53b65c1034 100644 --- a/django/middleware/http.py +++ b/django/middleware/http.py @@ -19,14 +19,14 @@ class ConditionalGetMiddleware(object): # Setting the status is enough here. The response handling path # automatically removes content for this status code (in # http.conditional_content_removal()). - response.status = 304 + response.status_code = 304 if response.has_header('Last-Modified'): if_modified_since = request.META.get('HTTP_IF_MODIFIED_SINCE', None) if if_modified_since == response['Last-Modified']: # Setting the status code is enough here (same reasons as # above). - response.status = 304 + response.status_code = 304 return response