summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-30 07:03:58 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-30 07:03:58 +0000
commit94beaa6ebbad080786a60944086a7bb95451c8ad (patch)
tree925968da99e462196f2b128c25bef562ee399c3b
parent6d5c868e86297a7591fe6e42e48805abc8607474 (diff)
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
-rw-r--r--django/middleware/http.py4
1 files 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