Open weimo110 opened 1 year ago
HTTP body and header size can be set in Java API. You can provide your own ServerConfig
to invoke createHttpServer
method.
以提供的 moco-runner-1.1.0-standalone.jar 包部署启动 mock ,能通过自定义配置文件配置请求体大小上限吗?
@caiming0917 Currently, no JSON API is provided.
18 8月 2023 17:14:38 [nioEventLoopGroup-3-2] ERROR Exception thrown io.netty.handler.codec.TooLongFrameException: HTTP content length exceeded 1048576 bytes. at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:218) at io.netty.handler.codec.http.HttpObjectAggregator.decode(HttpObjectAggregator.java:57) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278) at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:428) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:277) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:372) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:245) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:243) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:962) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:485) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:399) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:371) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) at java.base/java.lang.Thread.run(Thread.java:835)