﻿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
34428	ASGIStaticFilesHandler raises warning.	Carlton Gibson	Carlton Gibson	"#33735 added async support to `StreamingHttpResponse` for Django 4.2. 

With Django 4.2rc1 and Daphne, `ASGIStaticFilesHandler ` raises a warning about the incorrect iterator type being used: 

> http/response.py:534: Warning: StreamingHttpResponse must consume synchronous iterators in order to serve them asynchronously. Use an asynchronous iterator instead.

This is because `FileResponse` is not async compatible (nor is that likely, since neither is `open()`).

A new project with: 


{{{
INSTALLED_APPS = [
    ""daphne"",
    ...
]

ASGI_APPLICATION = ""project.asgi.application""
}}}
 
`runserver`, and then visit any page serving static files such as `/admin/`.

The fix is to have `ASGIStaticFilesHandler` adapt the iterator in the same way `StreamingHttpResponse` does. 
"	Bug	closed	contrib.staticfiles	4.2	Release blocker	fixed			Accepted	1	0	0	0	0	0
