Skip to content

Commit

Permalink
fix split in headers, only first ocurrence
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic182 committed Nov 21, 2020
1 parent 2aaa13b commit fef86ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aiosonic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fef86ab

Please sign in to comment.