'Send a MIME header.'

def send_header(self, keyword, value):

    base_send_header = BaseHTTPServer.BaseHTTPRequestHandler.send_header
    keyword = keyword.title()
    if (keyword == 'Set-Cookie'):
        for cookie in re.split(',    (?=[^    =]+(?:=|$))', value):
            base_send_header(self, keyword, cookie)
    elif ((keyword == 'Content-Disposition') and ('"' not in value)):
        value = re.sub('filename=([^"\\\']+)', 'filename="\\1"', value)
        base_send_header(self, keyword, value)
    else:
        base_send_header(self, keyword, value)
