Download Fails with IE


Try downloading this file:

with IE8 it fails the first time. It says the site cannot be found.

All subsequent attempts with IE work as expected. Only the first attempt fails. Firefox works always.

This is what the code does:

DownloadStream handleRequest(String path) {
	DownloadStream result = new DownloadStream(zipToDownload(path), "application/octet-stream", new File(path).getName() + ".zip");
	return result;

static private InputStream zipToDownload(String path) {
	ByteArrayOutputStream bytes = new ByteArrayOutputStream();
	ZipOutputStream out = new ZipOutputStream(bytes);
	//Write the entries to out...
	return new ByteArrayInputStream(bytes.toByteArray());

Any ideas?

Thanks, Klaus

Not really no. Have you debugged that the server and the application actually gets the request? That is, does it run the code there?

IE might like the Content-Disposition in the response, as mentioned
in this forum thread
in the Knowledge Base (if you’re a Pro Account subscriber).