Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求超过10MB报错,有配置的地方吗 #332

Open
weimo110 opened this issue Aug 18, 2023 · 3 comments
Open

请求超过10MB报错,有配置的地方吗 #332

weimo110 opened this issue Aug 18, 2023 · 3 comments

Comments

@weimo110
Copy link

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)

Repository owner deleted a comment from yangli8866 Aug 21, 2023
@dreamhead
Copy link
Owner

HTTP body and header size can be set in Java API. You can provide your own ServerConfig to invoke createHttpServer method.

public static ActualHttpServer createHttpServer(final int port,

@caiming0917
Copy link

以提供的 moco-runner-1.1.0-standalone.jar 包部署启动 mock ,能通过自定义配置文件配置请求体大小上限吗?

@dreamhead
Copy link
Owner

@caiming0917 Currently, no JSON API is provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants