HttpRequest httpRequest = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, url);
httpRequest.addHeader(HttpHeaders.Names.HOST, NettyConnector.this.host);
if (cookie != null)
{
httpRequest.addHeader(HttpHeaders.Names.COOKIE, cookie);
}
ChannelBuffer buf = (ChannelBuffer)e.getMessage();
httpRequest.setContent(buf);
httpRequest.addHeader(HttpHeaders.Names.CONTENT_LENGTH, String.valueOf(buf.writerIndex()));
Channels.write(ctx, e.getFuture(), httpRequest, e.getRemoteAddress());