File download as StreamResource doesn't start when using IE8 #837

Closed
vaadin-bot opened this Issue Sep 16, 2009 · 7 comments

Projects

None yet

1 participant

@vaadin-bot
Collaborator

Originally by @peterl1084


File download as StreamResource doesn't start with IE8 when content-disposition is specified to attachment. IE8 pops up a new browser window but closes it right away without downloading the file.

Other browser show file download dialog properly.

If content-disposition is not specified files are opened in new browser window instead of downloading them.

Following example code tested to work with (FF 3, 3.5, Opera 9, Safari 4).


Imported from https://dev.vaadin.com/ issue #3366

@vaadin-bot
Collaborator

Originally by @peterl1084


Attachment added: DownloadApplication.java (0.9 KiB)

@vaadin-bot
Collaborator

Originally by @peterl1084


Attachment added: DownloadResource.java (1.4 KiB)

@vaadin-bot
Collaborator

Originally by @Artur-


I fail to see the problem in Vaadin in this.

IE8 has a download prompter "automatic prompting for file downloads" (in security settings). If this is OFF there will be a yellow bar showing that the download has been denied by default and you should click it if you want to download the file. This is apparently what happens in the test case although and then IE8 closes the window immediately after that, never showing the bar.

If you enable "automatic prompting for file downloads" it will work as expected.

A better way however seems to be to use "" or "_self" instead of "_blank" (_new is not standard). Then the file will be downloaded in the current window and the possible warning bar is displayed (although it requires a reload of the page to be enabled, way to go IE8).

@vaadin-bot vaadin-bot closed this Sep 24, 2009
@vaadin-bot
Collaborator

Originally by Watt Lee


Attachment added: DownloadResource.2.java (1.7 KiB)
GAE version

@vaadin-bot
Collaborator

Originally by Watt Lee


AS Artur Signell described: After _new is replaced by _self, the source code works fine. Then I did some modifications and tested with Vaadin 6.3.4/GAE 1.3.4, IE8 report HTTP ERROR 500 as the following.

Is there anything wrong with the source code attached?

HTTP ERROR 500
Problem accessing /APP/1/test.zip. Reason:

INTERNAL_SERVER_ERROR

Caused by:
java.lang.IllegalArgumentException
at org.mortbay.jetty.Response.sendRedirect(Response.java:386)
at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:129)
...

@vaadin-bot
Collaborator

Originally by @Artur-


Attachment added: GaedltestApplication.java (1.8 KiB)

@vaadin-bot
Collaborator

Originally by @Artur-


Tested file download in Google App Enginen using Vaadin 6.6.1 and AppEngine SDK 1.5.1. Found no problems with IE8 (or IE9/Chrome 12/Firefox 5), test case attached.

@vaadin-bot vaadin-bot added the bug label Dec 9, 2016
@vaadin-bot vaadin-bot added this to the Vaadin 6.1.1 milestone Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment