﻿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
33755	Move ASGi body-file cleanup into ASGIRequest	Carlton Gibson	nobody	"In `django/core/handlers/asgi.py` `ASGIHandler.handle()` currently creates a temporary file, `body_file`, and then maintains responsibility for closing that once the response is generated in an extend `try...finally`. In outline: 




{{{
body_file = ... 

try:
    ...
finally:
    body_file.close()
}}}

The `body_file` is passed into the request, via `create_request()` and `ASGIRequest.__init()`. Conceptually the request object takes ownership of `body_file` at that point, and ideally it would be responsible for cleaning it up too, perhaps via a `__del__` implementation. "	Cleanup/optimization	new	HTTP handling	dev	Normal		ASGI		Unreviewed	0	0	0	0	0	0
