diff --git a/src/zamenyat/app.py b/src/zamenyat/app.py index e8222ce..d763094 100644 --- a/src/zamenyat/app.py +++ b/src/zamenyat/app.py @@ -76,7 +76,7 @@ class AsyncReader: class Socket: - def __init__(self, reader, writer, buffer_size,debug=True): + def __init__(self, reader, writer, buffer_size,debug=False): self.debug = debug self.reader = AsyncReader(reader,debug=self.debug) self.writer = AsyncWriter(writer,debug=self.debug) @@ -141,12 +141,10 @@ class Application: if 'Content-Length' in headers: while len(data) != headers['Content-Length']: chunk_size = headers['Content-Length'] - len(data) if self.buffer_size > headers['Content-Length'] - len(data) else self.buffer_size - print("Bef read") chunk = await reader.read(chunk_size) if not chunk: data = None return None - print("Aff read") data += chunk await writer.write(self.header_dict_to_bytes(req_resp, headers)) await writer.drain() @@ -155,8 +153,6 @@ class Application: else: data = await reader.read() await writer.write(data) - #if not headers.get('Connection') == 'keep-alive': # and not headers.get('Upgrade-Insecure-Requests'): - # break if not is_websocket: break except asyncio.CancelledError: