﻿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
16674	Django's WSGI Handler should report exceptions to the start_response() callback	James Henstridge	nobody	"The WSGI specification allows WSGI applications to pass an exception context to their start_response() callback if the response is being provided by an error handler.

This is quite useful for WSGI middleware that collects data about errors: they can log the problem and then pass on the error page generated by the application.

Unfortunately, Django's WSGI handler never seems to call start_response() with the third argument, preventing this sort of middleware from seeing errors in Django applications.

I think a solution to this would be something like:
 1. override handle_uncaught_exception() in WSGIHandler and make it stash exc_info somewhere (on the response object would be hacky but maybe workable).
 2. after __call__ invokes get_response(), check for a captured exc_info value.
 3. if exc_info was captured, pass it to start_response()
"	Bug	new	HTTP handling	dev	Normal			James Henstridge Graham Dumpleton	Accepted	1	0	0	1	0	0
