spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.52k stars 3.32k forks source link

form-data Connection has been closed BEFORE response, while sending request body #2125

Closed qimeinajie closed 3 years ago

qimeinajie commented 3 years ago

Describe the bug form-data Connection has been closed BEFORE response, while sending request body

Sample Like this : https://github.com/reactor/reactor-netty/issues/1062

image image

The problem is that a client request is content-type multipart/form-data and contains files. When forwarded to an upstream service, the server returns a status code of 400, while Springcloud-gateway returns a status code of 500

violetagg commented 3 years ago

@qimeinajie Can you enable these loggers on the target server so that we can see the network communication with Tomcat?

logging.level.org.apache.tomcat.util.net=DEBUG
logging.level.org.apache.coyote=DEBUG

or can you take a tcp dump to see the network communication with Tomcat

violetagg commented 3 years ago

@qimeinajie @spencergibb I think that the issue is in Reactor Netty. Let's close this. I'm working on a PR and once I'm ready I'll update the Reactor Netty issue.

qimeinajie commented 3 years ago

@qimeinajie @spencergibb I think that the issue is in Reactor Netty. Let's close this. I'm working on a PR and once I'm ready I'll update the Reactor Netty issue.

OK,Thank you very much

lmqian commented 2 years ago

@qimeinajie I have the same problem, have you solved it?or someway to bypass it?