'A sanity check on the response from a HTTP request
This method does a sanity check on whether the response from an HTTP
request conforms the HTTP RFC.
:param str method: The HTTP verb of the request associated with the
response being passed in.
:param resp: The response headers
:param resp_body: The body of the response
:raises ResponseWithNonEmptyBody: If the response with the status code
is not supposed to have a body
:raises ResponseWithEntity: If the response code is 205 but has an
entity'

def response_checker(self, method, resp, resp_body):

    if (((resp.status in set((204, 205, 304))) or (resp.status < 200) or (method.upper() == 'HEAD')) and resp_body):
        raise exceptions.ResponseWithNonEmptyBody(status=resp.status)
    if ((resp.status == 205) and (0 != len((((set(resp.keys()) - set(('status',))) - self.response_header_lc) - self.general_header_lc)))):
        raise exceptions.ResponseWithEntity()
    if ((method != 'HEAD') and (not resp_body) and (resp.status >= 400)):
        self.LOG.warning('status    >=    400    response    with    empty    body')
