diff --git a/AUTHORS b/AUTHORS
index 26f0362..3ff9b51 100644
a
|
b
|
answer newbie questions, and generally made Django that much better:
|
622 | 622 | Rajesh Dhawan <rajesh.dhawan@gmail.com> |
623 | 623 | Ramez Ashraf <ramezashraf@gmail.com> |
624 | 624 | Ramiro Morales <ramiro@rmorales.net> |
| 625 | Ramin Farajpour Cami <ramin.blackhat@gmail.com> |
625 | 626 | Ram Rachum <ram@rachum.com> |
626 | 627 | Randy Barlow <randy@electronsweatshop.com> |
627 | 628 | Raphaël Barrois <raphael.barrois@m4x.org> |
diff --git a/django/contrib/sessions/middleware.py b/django/contrib/sessions/middleware.py
index 5aaff43..8ae30d9 100644
a
|
b
|
class SessionMiddleware(MiddlewareMixin):
|
34 | 34 | else: |
35 | 35 | # First check if we need to delete this cookie. |
36 | 36 | # The session should be deleted only if the session is entirely empty |
37 | | if settings.SESSION_COOKIE_NAME in request.COOKIES and empty: |
| 37 | if if request.COOKIES.get(settings.SESSION_COOKIE_NAME) and empty: |
38 | 38 | response.delete_cookie( |
39 | 39 | settings.SESSION_COOKIE_NAME, |
40 | 40 | path=settings.SESSION_COOKIE_PATH, |