1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

Removed unused buf_size argument to LimitedStream().

Unused since its introduction in 269e921756371bee6d35a967bc2ffe84d1ae39eb.
This commit is contained in:
Nick Pope 2022-01-18 04:55:14 +00:00 committed by GitHub
parent 30a0144134
commit fac26684fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,11 +14,10 @@ _slashes_re = _lazy_re_compile(br'/+')
class LimitedStream:
"""Wrap another stream to disallow reading it past a number of bytes."""
def __init__(self, stream, limit, buf_size=64 * 1024 * 1024):
def __init__(self, stream, limit):
self.stream = stream
self.remaining = limit
self.buffer = b''
self.buf_size = buf_size
def _read_limited(self, size=None):
if size is None or size > self.remaining: