def shb(response):
    if py3k:
        h = response.getheaders()
    else:
        h = []
        key, value = None, None
        for line in response.msg.headers:
            if line:
                if line[0] in " \t":
                    value += line.strip()
                else:
                    if key and value:
                        h.append((key, value))
                    key, value = line.split(":", 1)
                    key = key.strip()
                    value = value.strip()
        if key and value:
            h.append((key, value))

    return "%s %s" % (response.status, response.reason), h, response.read()
Return status, headers, body the way we like from a response.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/test/webtest.py/shb