From f182f5e6ca6af7bcb62d5e8e4ed624180e5771df Mon Sep 17 00:00:00 2001 From: francesco Date: Fri, 27 Mar 2020 10:53:38 +0100 Subject: [PATCH] Added a log for size --- .../portlets/user/workspace/server/DownloadServlet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java b/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java index d1b36cc..bdc6cdd 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java +++ b/src/main/java/org/gcube/portlets/user/workspace/server/DownloadServlet.java @@ -354,9 +354,12 @@ public class DownloadServlet extends HttpServlet{ resp.setHeader("Content-Disposition", contentDisposition+"; filename=\"" + itemName + "\"" ); //Fixing Incident: 18926, replacing workspaceFileItem.getSize() with ItemStreamDescriptor.getSize() - if(descr.getSize()!=null && descr.getSize()>0) + if(descr.getSize()!=null && descr.getSize()>0) { resp = setContentLength(resp, descr.getSize()); + } + logger.info("The size is: "+descr.getSize()); + //MODIFIED 22-05-2013 CLOSE STREAM OutputStream out = resp.getOutputStream(); InputStream is = descr.getStream();