diff --git a/sanic/request.py b/sanic/request.py index 51d872e1..faa63137 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -1,6 +1,6 @@ +import asyncio import json import sys -import asyncio from cgi import parse_header from collections import namedtuple @@ -49,7 +49,6 @@ class RequestParameters(dict): class StreamBuffer: - def __init__(self, buffer_size=None): self._buffer_size = buffer_size or 100 self._queue = asyncio.Queue() diff --git a/sanic/server.py b/sanic/server.py index 9e1bdd12..ff87198e 100644 --- a/sanic/server.py +++ b/sanic/server.py @@ -294,7 +294,9 @@ class HttpProtocol(asyncio.Protocol): self.request ) if self._is_stream_handler: - self.request.stream = StreamBuffer(self.request_body_buffer_queue_size) + self.request.stream = StreamBuffer( + self.request_body_buffer_queue_size + ) self.execute_request_handler() def on_body(self, body):