'Convert string into httplib2 response and content.
Args:
payload: string, headers and body as a string.
Returns:
A pair (resp, content), such as would be returned from httplib2.request.'

def _deserialize_response(self, payload):

    (status_line, payload) = payload.split('\n', 1)
    (protocol, status, reason) = status_line.split('    ', 2)
    parser = FeedParser()
    parser.feed(payload)
    msg = parser.close()
    msg['status'] = status
    resp = httplib2.Response(msg)
    resp.reason = reason
    resp.version = int(protocol.split('/', 1)[1].replace('.', ''))
    content = payload.split('\r\n\r\n', 1)[1]
    return (resp, content)
