diff --git a/src/main/java/com/github/jlangch/venice/impl/functions/IOFunctions.java b/src/main/java/com/github/jlangch/venice/impl/functions/IOFunctions.java index 13095ee66..f809b19e8 100644 --- a/src/main/java/com/github/jlangch/venice/impl/functions/IOFunctions.java +++ b/src/main/java/com/github/jlangch/venice/impl/functions/IOFunctions.java @@ -2903,12 +2903,10 @@ else if (user != Nil || password != Nil) { } } - final long contentLength = conn.getContentLengthLong(); - try (BufferedInputStream is = new BufferedInputStream(conn.getInputStream())) { debugFn.applyOf(new VncString("Redirected url: " + conn.getURL())); - final byte[] data = slurpData(is, progressFn, contentLength); + final byte[] data = slurpData(is, progressFn, conn.getContentLengthLong()); return VncBoolean.isTrue(binary) ? new VncByteBuffer(ByteBuffer.wrap(data))