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:
parent
30a0144134
commit
fac26684fd
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user