Skip to content

adjunct.compat

parse_header(line)

Parse HTTP headers with the same format as Content-Type.

Parameters:

Name Type Description Default
line str

a HTTP header line

required

Returns:

Type Description
tuple[str, dict[str, str]]

The main value and a dictionary of options.

(Copied from Python's cgi module until I can find a better alternative.)