Hi,
We have one controller (Play 2.7) that acts as a proxy to other services, and we use the WSClient (underlying AsyncHttpClient) to make the proxied requests (via request.stream()). If we load the entire response into memory immediately (response.bodyAsBytes) everything works fine. However if we stream or chunk the response as a Source (of ByteString), 50% of requests will fail on curl with “transfer closed with outstanding read data remaining” for chunked (translates to ERR_INCOMPLETE_CHUNKED_ENCODING for node.js clients) or “transfer closed with xxx bytes remaining to read” for streamed responses, regardless of whether akka or netty is used as http backend. Our proxied server is a Vert.x backend, and I assume some sensitive timeout (or missing/erroneous header) is responsible for the disconnect when brokering the chunked/streamed response from the proxied server back to the requesting client.
Thanks