Opened 8 years ago

Closed 8 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
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: UI/UX:


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

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

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@…> 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Jiri Barton <jbar@…>

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.