This issue occured at work when used a spring application as a proxy and returned ResponseEntity
This bug then causes the client side to hang as it waits on the missing bytes. Different clients handle this differently, the Intellij client aborts the request after 60 seconds and displays a failure. While Postman receives the full response, shows that it's a 200 OK but still waits for the missing bytes but doesn't fail after 60 seconds
The fix seems to be to always recalculate the Content-Length header even if already present
Comment From: wilkinsona
Your proxy is at fault here. It should either create and return a new ResponseEntity with a fresh set of HTTP headers, or it should clear the Content-Length header (and any others that are not generally applicable) from the existing ResponseEntity before returning it.
This is also the case if I manually construct a ResponseEntity as shown in the repo
This is to be expected. You've manually set the Content-Length header, so the default Content-Length header is not set.