@staticmethod
def _find_content_len(meta):
    """
        Handles urllib/urllib2 compatibility
        :return: size of the file in bytes
        :rtype: int
        """
    if hasattr(meta, '_headers'):
        file_size = 1
        for header in meta._headers:
            if header[0] == 'Content-Length':
                file_size = int(header[1])
                break
    elif hasattr(meta, 'getheaders') and meta.getheaders('Content-Length'):
        file_size = int(meta.getheaders('Content-Length')[0])
    else:
        file_size = 1
    return file_size
