﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31229	Add setting to allow flexible session saving based on response codes	Vincent Wang	nobody	"Inside django.contrib.sessions.middleware.SessionMiddleware.process_response (https://github.com/django/django/blob/master/django/contrib/sessions/middleware.py), we have a line where we don't save the session of the request if the response status code is 500. The comment in the code refers to this issue: https://code.djangoproject.com/ticket/3881 where it's concluded that a 500 code is most likely to indicate that it's an incomplete request and the response shouldn't save anything else.

I would find it useful to be able to prevent saving of the session when the response status code is anything in the 5xx status code range. This would be possible if we implemented some setting that defaulted to include the status code 500, but allowed users to override it with a list of status codes where the session would not save. "	New feature	closed	contrib.sessions	3.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
