def parse_response(response):
    """Try and parse response as an HTTP response.
    Returns a httplib.http.HTTPResponse if sucessful
    Returns None if response is not a HTTP response
    """
    s = _FakeSocket(response)
    response = httplib.HTTPResponse(s, strict=1)
    try:
        response.begin()
        return response
    except httplib.HTTPException:
        return None
Try and parse response as an HTTP response.
    Returns a httplib.http.HTTPResponse if sucessful
    Returns None if response is not a HTTP response
    
nogotofail/mitm/util/http.py