diff --git a/adafruit_requests.py b/adafruit_requests.py index 4b90736..9b58a04 100644 --- a/adafruit_requests.py +++ b/adafruit_requests.py @@ -266,7 +266,8 @@ def _parse_headers(self) -> None: header = self._readto(b"\r\n") if not header: break - title, content = bytes(header).split(b": ", 1) + title, content = bytes(header).split(b":", 1) + content = content.strip() if title and content: # enforce that all headers are lowercase title = str(title, "utf-8").lower()