diff --git a/common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java index 94c8ec23..c85c0f5f 100644 --- a/common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java +++ b/common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java @@ -130,7 +130,7 @@ private void writeToResponse(CompressedInputStream data, HttpResponse response, ) { response.addHeader("Content-Encoding", Compression.GZIP.getId()); ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); - try (OutputStream os = Compression.GZIP.compress(byteOut)) { + try (data; OutputStream os = Compression.GZIP.compress(byteOut)) { data.decompress().transferTo(os); } byte[] compressedData = byteOut.toByteArray();