fix: Utils lint fixes
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
|
||||
def parse_cookies(cookie_header: str) -> dict[str, str]:
|
||||
"""Parse HTTP cookie header into a dictionary."""
|
||||
cookies = {}
|
||||
cookies: dict[str, str] = {}
|
||||
if not cookie_header:
|
||||
return cookies
|
||||
|
||||
for cookie in cookie_header.split(";"):
|
||||
cookie = cookie.strip()
|
||||
if "=" in cookie:
|
||||
name, value = cookie.split("=", 1)
|
||||
for cookie_part in cookie_header.split(";"):
|
||||
cookie_str = cookie_part.strip()
|
||||
if "=" in cookie_str:
|
||||
name, value = cookie_str.split("=", 1)
|
||||
cookies[name.strip()] = value.strip()
|
||||
|
||||
return cookies
|
||||
|
||||
Reference in New Issue
Block a user