You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RestClient closes stream for ResponseEntity<InputStream> responsesΒ #36492
After migrating from version 7.0.5 to 7.0.6 the RestClient using https://github.com/ooraini/gotenberg-spring/ does not work anymore (stream is closed before body could be read).
Exception in thread "main" org.apache.hc.core5.http.StreamClosedException: Stream already closed
at org.apache.hc.core5.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:162)
at org.apache.hc.core5.http.io.EofSensorInputStream.read(EofSensorInputStream.java:138)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:119)
at java.base/java.io.PushbackInputStream.read(PushbackInputStream.java:185)
at java.base/java.io.InputStream.readNBytes(InputStream.java:411)
at java.base/java.io.InputStream.readAllBytes(InputStream.java:348)
It looks like, that #36380 triggers the new behaviour.
The new isStreamingResult method in DefaultRestClient does not work correctly, because the body (InputStream) is wrapped within a ResponseEntity (so instanceof does not work).
In the result close is not set (correctly) to false and closes the stream to early.
changed the title [-]RestClient does not work correctly (closes the result stream) after migrating from 7.0.5 to 7.0.6[/-][+]RestClient closes stream for ResponseEntity<InputStream> responses[/+]on Mar 24, 2026
Activity
[-]RestClient does not work correctly (closes the result stream) after migrating from 7.0.5 to 7.0.6[/-][+]RestClient closes stream for ResponseEntity<InputStream> responses[/+]Fix response stream handling in `RestClient`