

def filename_from_content_disposition(content_disposition):
    '\n    Extract and validate filename from a Content-Disposition header.\n\n    :param content_disposition: Content-Disposition value\n    :return: the filename if present and valid, otherwise `None`\n\n    '
    msg = Message(('Content-Disposition: %s' % content_disposition))
    filename = msg.get_filename()
    if filename:
        filename = os.path.basename(filename).lstrip('.').strip()
        if filename:
            return filename

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/httpie/downloads.py filename_from_content_disposition/original