streamed zip

T

Tore Halset

Hello.

I have a servlet that streams a zip archive to the client. It uses
java.util.zip.ZipOutputStream & co. It does not set the content
length header as the size is not known before the zip is created.

When a windows user clicks on a link to this servlet, she can
choose between "open" and "save". Save works very well, but
"open" does not. Using "open" just show an empty zip archive.

Anyone else seen this? Any known workaround?

Regards,
- Tore.
 
I

Ingo R. Homann

Hi,

Tore said:
I have a servlet that streams a zip archive to the client. It uses
java.util.zip.ZipOutputStream & co. It does not set the content
length header as the size is not known before the zip is created.

When a windows user clicks on a link to this servlet, she can
choose between "open" and "save". Save works very well, but
"open" does not. Using "open" just show an empty zip archive.

Anyone else seen this? Any known workaround?

I am not sure if this is really the problem, but some time ago, I
encountered a similar problem (or: "a different problem with a similar
effect"):

When "opening" some remote resource via IE, some IE versions seem do not
pass the 'response-stream' to the application, but rather pass the URL
of the 'resource' to the application which causes the application to
send a second request to the server. If the server is not able to handle
that, this will cause problems.

Ciao,
Ingo
 
T

Tore Halset

Ingo R. Homann said:
When "opening" some remote resource via IE, some IE versions seem do not
pass the 'response-stream' to the application, but rather pass the URL
of the 'resource' to the application which causes the application to
send a second request to the server. If the server is not able to handle
that, this will cause problems.

Thanks for the tip. I do not think this is the issue as the dialog show
that several MBs are downloaded.

The same problem happens with both MS Compressed Folders and with
WinZip 8.0 (I do not have a newer version).

- Tore.
 
T

Tore Halset

Tore Halset said:
I have a servlet that streams a zip archive to the client. It uses
java.util.zip.ZipOutputStream & co. It does not set the content
length header as the size is not known before the zip is created.
When a windows user clicks on a link to this servlet, she can
choose between "open" and "save". Save works very well, but
"open" does not. Using "open" just show an empty zip archive.

Perhaps it is "Case 2" in this issue:
http://support.microsoft.com/?kbid=308090

Strange

- Tore.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top