MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / parse_headers

Function parse_headers

notify.py:901–917  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

899
900
901def parse_headers(headers):
902 if not headers:
903 return {}
904
905 parsed = {}
906 lines = headers.split("\n")
907
908 for line in lines:
909 i = line.find(":")
910 if i == -1:
911 continue
912
913 key = line[:i].strip().lower()
914 val = line[i + 1 :].strip()
915 parsed[key] = parsed.get(key, "") + ", " + val if key in parsed else val
916
917 return parsed
918
919
920def parse_string(input_string, value_format_fn=None):

Callers 1

custom_notifyFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected