Opened 19 years ago

Closed 19 years ago

#1048 closed defect (fixed)

[patch] AttributeError when SESSION_SAVE_EVERY_REQUEST is True and no cookie has been set yet.

Reported by: Jiri Barton <jbar@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

[1303] introduced SESSION_SAVE_EVERY_REQUEST. The code in source:django/trunk/django/middleware/sessions.py does not handle the situation when

  • there is no cookie in the browser yet (or no sessionid for the host), and
  • SESSION_SAVE_EVERY_REQUEST is True.

The reason it has failed to catch someone's attention may be that browsers are often set to keep the cookies. This error reappeared with the name of the default cookies changed in [1584].

Attachments (1)

middleware-sessions_r1303.diff (1.6 KB ) - added by Jiri Barton <jbar@…> 19 years ago.

Download all attachments as: .zip

Change History (2)

by Jiri Barton <jbar@…>, 19 years ago

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [1978]) Fixed #1048 -- Fixed AttributeError in sessions framework when SESSION_SAVE_EVERY_REQUEST is True and no cookie has been set yet. Thanks, Jiri Barton

Note: See TracTickets for help on using tickets.
Back to Top