cherrypy._private_api.compat.headers module

HTTP header parsing helpers.

cherrypy._private_api.compat.headers._parse_param(s)[source]
cherrypy._private_api.compat.headers.parse_header(line)[source]

Parse a Content-Type like header.

Return the main Content-Type and a dictionary of options.

Copied from removed stdlib cgi module. See cherrypy/cherrypy#2014 (comment) for background.