byte[] requestBytes = request.getRequestBytes();
ByteArrayEndPoint endPoint = new ByteArrayEndPoint(requestBytes, 1024);
endPoint.setGrowOutput(true);
AbstractHttpConnection connection = new BlockingHttpConnection(ReverseHTTPConnector.this, endPoint, getServer());
connectionOpened(connection);
try
{
// Loop over the whole content, since handle() only
// reads up to the connection buffer's capacities
while (endPoint.getIn().length() > 0)
connection.handle();
byte[] responseBytes = endPoint.getOut().asArray();
RHTTPResponse response = RHTTPResponse.fromResponseBytes(request.getId(), responseBytes);
client.deliver(response);
}