From e9f7ae54d64be673117e4cabe32badd01048bb69 Mon Sep 17 00:00:00 2001 From: UltraQbik Date: Fri, 23 Aug 2024 21:11:20 +0300 Subject: Update API and response class --- src/APIv1.py | 2 +- src/request.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/APIv1.py b/src/APIv1.py index c9ba2da..f163c5b 100644 --- a/src/APIv1.py +++ b/src/APIv1.py @@ -78,7 +78,7 @@ def api_call(client: SSLSocket, request: Request) -> Response: if size < API_FILE_RANDOM_MIN_SIZE_LIMIT or size > API_FILE_RANDOM_MAX_SIZE_LIMIT: return Response(b'', STATUS_CODE_BAD_REQUEST) - return Response(random_data_gen(size), STATUS_CODE_OK) + return Response(random_data_gen(size), STATUS_CODE_OK, compress=False) else: return Response(b'', STATUS_CODE_BAD_REQUEST) else: diff --git a/src/request.py b/src/request.py index 28d7c14..df0d433 100644 --- a/src/request.py +++ b/src/request.py @@ -72,4 +72,4 @@ class Response: self.data: bytes = data self.status: StatusCode = status self.headers: dict[str, Any] = headers if headers is not None else dict() - self.compress: bool = kwargs.get("compress", False) + self.compress: bool = kwargs.get("compress", True) -- cgit 1.4.1