def http_dump(fl):

    """Format fileobject wrapped in urllib.addinfourl as HTTP message string
    and return.
    """

    return "\r\n".join([
        str(fl.code) +" "+ fl.msg,
        "".join(fl.headers.headers),
        fl.read().strip()])