fix(handlers): positive content-length check
Python Lint CI / ruff (push) Successful in 5m33s
Python Lint CI / ruff-format-check (push) Successful in 4m44s
Python Lint CI / ty (push) Successful in 4m42s
Docker CI / docker-build (push) Successful in 6m50s
Python Test CI / coverage (push) Failing after 2m13s

This commit is contained in:
2026-06-02 22:26:38 +02:00
parent fe97828785
commit 4b007d8242
+1 -1
View File
@@ -252,7 +252,7 @@ class BaseHandler(abc.ABC, http.server.BaseHTTPRequestHandler):
return self.__in_size
def _get_length(self) -> int:
return int(self._get_header("Content-Length", "0"))
return max(0, int(self._get_header("Content-Length", "0")))
def _get_header(self, key: str, default_value: str = "") -> str:
if self._has_header(key):