so_is_this
12-20-2006, 09:35 AM
I'm using the following code to perform an HTTP download of zipped files from a hidden folder and using hidden file names (thus, I can't just use a simple hyperlink):
<%
Response.Buffer = True
Response.Cookies("Offerings")("Tracker") = Chr2Hex(OfferingsTracker)
Response.Cookies("Offerings").Expires = DateAdd("yyyy", 10, Date())
Response.Cookies("Offerings").Path = "/"
Response.AddHeader "content-disposition", "attachment; filename=" & fileName
Response.AddHeader "content-length", Len(stream)
Response.ContentType = mimeType
Response.BinaryWrite stream
%>
Note that the MIME type I am using is the normal association for zip and tar files:
"application/x-tar"
The hyperlink I use is built from a database like this:
<a href="offering_downloader.asp?offeringno=<%=myRst.Fields("OfferingNumber").Value%>"
style="font:12pt 'Courier New',monospace;"><%=myRst.Fields("OfferingName").Value%></a>
This works perfectly in IE6, but ends up downloading only half the number of bytes when used with IE7. Any ideas as to why?
<%
Response.Buffer = True
Response.Cookies("Offerings")("Tracker") = Chr2Hex(OfferingsTracker)
Response.Cookies("Offerings").Expires = DateAdd("yyyy", 10, Date())
Response.Cookies("Offerings").Path = "/"
Response.AddHeader "content-disposition", "attachment; filename=" & fileName
Response.AddHeader "content-length", Len(stream)
Response.ContentType = mimeType
Response.BinaryWrite stream
%>
Note that the MIME type I am using is the normal association for zip and tar files:
"application/x-tar"
The hyperlink I use is built from a database like this:
<a href="offering_downloader.asp?offeringno=<%=myRst.Fields("OfferingNumber").Value%>"
style="font:12pt 'Courier New',monospace;"><%=myRst.Fields("OfferingName").Value%></a>
This works perfectly in IE6, but ends up downloading only half the number of bytes when used with IE7. Any ideas as to why?