Skip to content

rest 接口响应内容大于1kb时触发分块传输,导致报错 #12891

@imjyz

Description

@imjyz
  • I have searched the issues of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 3.2.5
  • Java version: 1.8

Steps to reproduce this issue

  1. 使用rest协议暴露一个接口,响应内容大于 1kb
  2. 服务启动后,访问该接口即可触发。

Actual Behavior

实际响应内容会追加报错信息

dubbo rest invoke Internal error, message is null ,and exception type is : class java.lang.IllegalStateException , stacktrace is: 
        at org.apache.dubbo.rpc.protocol.rest.netty.ChunkOutputStream.reset(ChunkOutputStream.java:53)
        at org.apache.dubbo.rpc.protocol.rest.extension.resteasy.ResteasyContext.restOutputStream(ResteasyContext.java:176)
        at org.apache.dubbo.rpc.protocol.rest.extension.resteasy.filter.ResteasyResponseContainerFilterAdapter.filter(ResteasyResponseContainerFilterAdapter.java:62)
        at org.apache.dubbo.rpc.protocol.rest.handler.NettyHttpHandler.executeFilters(NettyHttpHandler.java:137)
        at org.apache.dubbo.rpc.protocol.rest.handler.NettyHttpHandler.handle(NettyHttpHandler.java:107)
        at org.apache.dubbo.rpc.protocol.rest.netty.RestHttpRequestDecoder.lambda$decode$0(RestHttpRequestDecoder.java:67)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41)
        at java.lang.Thread.run(Thread.java:748)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugBugs to being fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions