#35289: Chunked transfer encoding is not handled correctly by MultiPartParser -------------------------------------+------------------------------------- Reporter: Kyle Agronick | Owner: nobody Type: Bug | Status: new Component: HTTP handling | Version: dev Severity: Normal | Resolution: Keywords: transfer-encoding, | Triage Stage: Accepted chunked, multi-part | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Kyle Agronick):
Replying to [comment:11 bcail]: > [https://github.com/django/django/blob/main/django/core/handlers/asgi.py#L260 The ASGI handler] might be relevant. That is interesting. So it seems like it could be optimized even further. In my use case with the 6GB upload it would create two 6GB files on disk. `_load_post_and_files` seems like it should be hooked into that directly with the `MultiPartParser` instead of buffering it all to disk and then reading it out but that seems even more ambitious. Another problem I see there is that once it spools to disk it is going to block the event loop because it is doing blocking IO. It should be doing something like asgiref's `sync_to_async`. -- Ticket URL: <https://code.djangoproject.com/ticket/35289#comment:12> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018e525c1f61-c74dc223-f499-41d4-b1f8-ab686da3eb75-000000%40eu-central-1.amazonses.com.