def response_content_length(response):
    """
    Get content length from response headers.
    """
    try:
        content_length = int(response.headers["content-length"])
    except KeyError:
        content_length = 0
    return content_length