From fef86ab96541990c1de67ad33419ec1a2ab68d92 Mon Sep 17 00:00:00 2001 From: sonic182 Date: Sat, 21 Nov 2020 23:48:00 +0100 Subject: [PATCH] fix split in headers, only first ocurrence --- aiosonic/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aiosonic/__init__.py b/aiosonic/__init__.py index 48b6701..472aba1 100644 --- a/aiosonic/__init__.py +++ b/aiosonic/__init__.py @@ -85,8 +85,7 @@ class HttpHeaders(CaseInsensitiveDict): @staticmethod def _clear_line(line: bytes): """Clear readed line.""" - line = line.rstrip() - return line.split(b': ') if b': ' in line else line.split(b':') + return line.rstrip().split(b': ', 1) #: Headers