Download large Blob corrupted and Content-Length is removed from Response
Hi,
I am serving files stored WCS via Satellite URL so the users can download the files. When the files is big (ex. 30 MB) the download stop and the file become corrupted.
I tried to add <strong>Content-Length</strong> <span style="font-family: arial,helvetica,sans-serif;">to Response Header using the code below but it's removed from response. </span>
<span style="font-family: arial,helvetica,sans-serif;">The other arguments appear in the Response correctly. <br/></span>
<blobservice:gettablename varname="blobTable"/> <blobservice:getidcolumn varname="blobCol"/> <blobservice:geturlcolumn varname="blobUrlCol"/> <render:getbloburl blobtable='<%=ics.GetVar("blobTable")%>' blobkey='<%=ics.GetVar("blobCol")%>' blobcol='<%=ics.GetVar("blobUrlCol")%>' blobwhere='<%= ics.GetVar("blobID")%>' blobheader='<%= ics.GetVar("headerType") %>' blobnocache="true" outstr="blobUrl" preferreddir="blobs"> <ics:sql sql='<%="select urldata,filevalue from MungoBlobs where id=" + ics.GetVar("blobID")%>' listname="blobdata" table="MungoBlobs" /> <ics:listget listname="blobdata" fieldname="urldata" output="urldata" /> <ics:setvar name="blobpath" value='<%=ics.GetProperty("cc.urlattrpath", "gator.ini", true) + ics.GetVar("urldata")%>' /> <% File blobFile = new File(ics.GetVar("blobpath")); long length = blobFile.length(); ics.SetVar("length", Long.toString((int) length)); %> <render:argument name="blobheadername1" value="content-type"/> <render:argument name="blobheadervalue1" value='<%= (ics.GetVar("type") +"/"+ ics.GetVar("filetype")+";charset=UTF-8").replaceAll("[-+.^:,]","") %>'/> <render:argument name="blobheadername2" value="Content-Disposition"/> <render:argument name="blobheadervalue2" value='<%= ("inline; filename="+ics.GetVar("filename")).replaceAll("[-+^:,][0-9 ]+","") %>'/> <render:argument name="blobheadername3" value="MDT-Type"/> <render:argument name="blobheadervalue3" value="abinary; charset=UTF-8"/> <render:argument name="blobheadername4" value="Content-Length"/> <render:argument name="blobheadervalue4" value='<%= ics.GetVar("length") %>'/>