Files
bugsink/sentry/utils/auth.py
2023-11-09 20:53:01 +01:00

12 lines
298 B
Python

def _make_key_value(val):
return val.strip().split("=", 1)
def parse_auth_header(header):
if isinstance(header, bytes):
header = header.decode("latin1")
try:
return dict(map(_make_key_value, header.split(" ", 1)[1].split(",")))
except Exception:
return {}