@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof HttpObject) { Response response = wrapResponse(ctx, (HttpObject) msg); ctx.fireChannelRead(response); getProxyRequestQueue(ctx).onResponseDrainNext(ctx, response); } else { ctx.fireChannelRead(msg); } }