def retrievedoc(response):
    """Retrieve the HTML text from the ur1.ca response.

    response: the file-like HTTP response file returned by ur1.ca.

    Returns the text as a string.

    """
    #XXX: ensure all bytes are read
    res_info = response.info()
    clength = int(res_info["content-length"])
    return response.read(clength)