We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ac1d2d commit 282c3c5Copy full SHA for 282c3c5
src/main/java/org/tinystruct/net/handlers/HTTPHandler.java
@@ -278,7 +278,7 @@ public HTTPResponse(HttpResponse<InputStream> response) {
278
this.headers = response.headers().map();
279
280
try (InputStream in = response.body()) {
281
- if (in != null) {
+ if (in != null && in.available() > 0) {
282
String contentEncoding = response.headers()
283
.firstValue("Content-Encoding").orElse(null);
284
InputStream decodedStream = getDecodedInputStream(contentEncoding, in);
0 commit comments