private void switchToHttp(ChannelHandlerContext ctx, ByteBuf msg) {
ChannelPipeline pipeline = ctx.pipeline();
addLastIfNotPresent(pipeline, new HttpServerCodec(8192, 8192, 8192));
addLastIfNotPresent(pipeline, new HttpContentDecompressor());
addLastIfNotPresent(pipeline, httpContentLengthRemover);
addLastIfNotPresent(pipeline, new HttpObjectAggregator(Integer.MAX_VALUE));
if (mockServerLogger.isEnabled(TRACE)) {
addLastIfNotPresent(pipeline, loggingHandler);
}
configurePipeline(ctx, pipeline);
pipeline.remove(this);
ctx.channel().attr(LOCAL_HOST_HEADERS).set(getLocalAddresses(ctx));
// fire message back through pipeline
ctx.fireChannelRead(msg);
}
PortUnificationHandler.java 文件源码
java
阅读 45
收藏 0
点赞 0
评论 0
项目:mockserver
作者:
评论列表
文章目录