Zuul returns "400 Bad Request" randomly for chunked responses
See original GitHub issueHey!
Sending a PUT request to an API through Zuul returns 400 Bad Request
randomly. If I send the same request directly to the API behind, it always works returning 200 OK
, but if the request goes through Zuul, it sometimes returns 200 OK
, sometimes fails.
Analyzing packages with tcpdump
shows an strange behaviour of one http request receiving two http responses, which it shouldn’t happen at all.
The API behind zuul is an Spring Boot application returning a Single
object, and it sends chunks responses to Zuul. I’ve reproduced the same issue with this endpoint.
inputStream
is reading a JSON file from the server to simulate the response. With this code, we get a 400 Bad Request
one on every 10-15 requests.
It also looks like if the inputStream
reads a small file, no error is shown, but if the file goes above some bytes, it starts happening.
Any help?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (1 by maintainers)
I met this because I have wrote my own filter, In my filter I change the body size ,then the real content-length is not equals to the value in head.
hey @sokie
This is the config I have and that has been working for me.
I hope it helps