#36193: AssertionError: Invalid ASGI message after request body: http.request
-------------------------------------+-------------------------------------
Reporter: codedoga | Type: Bug
Status: new | Component: HTTP
| handling
Version: 5.0 | Severity: Normal
Keywords: ASGI, | Triage Stage:
http.disconect, | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
I suspect that with the feature introduced from Django 5.0 for handling
http.disconnect events. Something might be problematic under certain
conditions with async views in Django. I only saw this happening with
Nginx Unit and Django>=5.0. [
https://code.djangoproject.com/ticket/33738]
Here is also the ticket on Nginx Unit github
[
https://github.com/nginx/unit/issues/1561] it contains traceback, Unit
log and behavior described in more detail.
I also created demo project to reproduce this behavior:
[
https://github.com/codedoga/nginx_unit_asgi_django]
Another thing I noticed is that if I override ASGIHandler with the one
used by Django<=5.0 it works without issues.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36193>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.