bottle_auth/core/httputil.py
def _parse_header(line):
    """Parse a Content-type like header.

    Return the main content-type and a dictionary of options.

    """
    parts = _parseparam(';' + line)
    key = parts.next()
    pdict = {}
    for p in parts:
        i = p.find('=')
        if i >= 0:
            name = p[:i].strip().lower()
            value = p[i+1:].strip()
            if len(value) >= 2 and value[0] == value[-1] == '"':
                value = value[1:-1]
                value = value.replace('\\\\', '\\').replace('\\"', '"')
            pdict[name] = value
    return key, pdict
def _parse_header(line):
    parts = _parseparam(';' + line)
    key = parts.next()
    pdict = {}
    for p in parts:
        i = p.find('=')
        if i >= 0:
            name = p[:i].strip().lower()
            value = p[i+1:].strip()
            if len(value) >= 2 and value[0] == value[-1] == '"':
                value = value[1:-1]
                value = value.replace('\\\\', '\\').replace('\\"', '"')
            pdict[name] = value
    return key, pdict
def _parse_header ( line ) : parts = _parseparam ( ';' + line ) key = parts . next ( ) pdict = { } for p in parts : i = p . find ( '=' ) if i >= 0 : name = p [ : i ] . strip ( ) . lower ( ) value = p [ i + 1 : ] . strip ( ) if len ( value ) >= 2 and value [ 0 ] == value [ - 1 ] == '"' : value = value [ 1 : - 1 ] value = value . replace ( '\\\\' , '\\' ) . replace ( '\\"' , '"' ) pdict [ name ] = value return key , pdict
Parse a Content-type like header.

    Return the main content-type and a dictionary of options.
Parse a Content - type like header .