mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
12 lines
298 B
Python
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 {}
|