#33755: Move ASGI body-file cleanup into ASGIRequest
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Jonas
Type: | Lundberg
Cleanup/optimization | Status: assigned
Component: HTTP handling | Version: dev
Severity: Normal | Resolution:
Keywords: ASGI | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Carlton Gibson):
Hey Jonas, thanks for looking so quickly!
> Thoughts?
Initially it would be to sketch out the tests for the cases we need to
cover... — then is making them pass feasible?
> ...property drops the reference to the `body_file` by overwriting it
with a `BytesIO`
Grrr. Yes... Is the file closed when references hit zero? And can we `del`
the higher `handle()` to make sure it's not retained there? 🤔 — Need to
have a look. Otherwise, yes, explicitly closing would be needed.
It could well be that combinations of `stream`/`read`/`body` usage mean we
have to say `wontfix` — but it'd be nice to be clear on that if we do have
to.
--
Ticket URL: <https://code.djangoproject.com/ticket/33755#comment:7>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701811976ccf2-5286ac9d-06f9-4408-8e8c-c063a65f4c09-000000%40eu-central-1.amazonses.com.