diff options
| author | Jonas Lundberg <jonas@5monkeys.se> | 2022-06-02 23:19:16 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton@noumenal.es> | 2022-06-09 11:11:45 +0200 |
| commit | e96320c91724830034033a9cb8afd9cf8c11e2fd (patch) | |
| tree | 12d82a70c1820bccc2f606b886bed4fdd3f6ea54 /django/http/request.py | |
| parent | c32858a8ce961d276215a040ae0ab1e4409b70f8 (diff) | |
Fixed #33755 -- Moved ASGI body-file cleanup into request class.
Diffstat (limited to 'django/http/request.py')
| -rw-r--r-- | django/http/request.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/http/request.py b/django/http/request.py index 4b160bc5f4..ad4ec0f331 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -340,6 +340,8 @@ class HttpRequest: self._body = self.read() except OSError as e: raise UnreadablePostError(*e.args) from e + finally: + self._stream.close() self._stream = BytesIO(self._body) return self._body |
