'Get/set the charset (in the Content-Type)'

def charset__get(self):

    header = self.headers.get('content-type')
    if (not header):
        return None
    match = _CHARSET_RE.search(header)
    if match:
        return match.group(1)
    return None
