request.setHeader(HttpHeaders.Names.CONTENT_TYPE,
"application/octet-stream");
request.setHeader(HttpHeaders.Names.CONTENT_LENGTH, buf.readableBytes());
request.setContent(ChannelBuffers.wrappedBuffer(buf.getRawBuffer(),
buf.getReadIndex(), buf.readableBytes()));
HttpClient client = HttpTunnelService.httpClient;
try {
client.execute(request, new HttpClientFutureCallback(buf));
} catch (HttpClientException e) {
logger.error("Push worker got unexpected exception:",e);
isReady = true;
}
}