Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

magic-removal: Merged to [1978]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1979 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c86d34a935519aa59b3c04b0845f6c8a6ef80fbd 1 parent 34c587e
Adrian Holovaty authored January 15, 2006
1  AUTHORS
@@ -35,6 +35,7 @@ answer newbie questions, and generally made Django that much better:
35 35
     Andreas
36 36
     David Ascher <http://ascher.ca/>
37 37
     Arthur <avandorp@gmail.com>
  38
+    Jiri Barton
38 39
     James Bennett
39 40
     Paul Bissex <http://e-scribe.com/>
40 41
     Simon Blanchard
17  django/contrib/sessions/middleware.py
@@ -69,12 +69,13 @@ def process_response(self, request, response):
69 69
         try:
70 70
             modified = request.session.modified
71 71
         except AttributeError:
72  
-            modified = False
73  
-        if modified or SESSION_SAVE_EVERY_REQUEST:
74  
-            session_key = request.session.session_key or Session.objects.get_new_session_key()
75  
-            new_session = Session.objects.save(session_key, request.session._session,
76  
-                datetime.datetime.now() + datetime.timedelta(seconds=SESSION_COOKIE_AGE))
77  
-            expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=SESSION_COOKIE_AGE), "%a, %d-%b-%Y %H:%M:%S GMT")
78  
-            response.set_cookie(SESSION_COOKIE_NAME, session_key,
79  
-                max_age=SESSION_COOKIE_AGE, expires=expires, domain=SESSION_COOKIE_DOMAIN)
  72
+            pass
  73
+        else:
  74
+            if modified or SESSION_SAVE_EVERY_REQUEST:
  75
+                session_key = request.session.session_key or Session.objects.get_new_session_key()
  76
+                new_session = Session.objects.save(session_key, request.session._session,
  77
+                    datetime.datetime.now() + datetime.timedelta(seconds=SESSION_COOKIE_AGE))
  78
+                expires = datetime.datetime.strftime(datetime.datetime.utcnow() + datetime.timedelta(seconds=SESSION_COOKIE_AGE), "%a, %d-%b-%Y %H:%M:%S GMT")
  79
+                response.set_cookie(SESSION_COOKIE_NAME, session_key,
  80
+                    max_age=SESSION_COOKIE_AGE, expires=expires, domain=SESSION_COOKIE_DOMAIN)
80 81
         return response

0 notes on commit c86d34a

Please sign in to comment.
Something went wrong with that request. Please try again.