View Issue Details

IDProjectCategoryView StatusLast Update
0010402mantisbtbugtrackerpublic2010-09-19 03:11
Reporternrbrown Assigned Todhx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.0a3 
Summary0010402: Can't download attachments with IE
Description

We recently set up mantis and users are reporting that they are unable to download files attached to tickets. This is only being reported by users of IE and I've been able to duplicate the problem in IE6, IE7, and IE8.

File downloads work fine in other browsers (specifically Firefox & Chrome).

An online search of this issue brought up ticket 0007914 which states that the problem has been resolved. However we are still seeing it.

Tagsattachments, https, Internet Explorer

Relationships

duplicate of 0011075 closeddhx File downloading - IE vs non-IE filename bugs 
related to 0009998 closedgrangeway Export functions generate bad URL 
related to 0009775 closeddhx Unable to download attachments with spaces in the filename 

Activities

jreese

jreese

2009-04-24 14:48

reporter   ~0021669

This is a problem with IE, due to the (stupid) way that it handles temporary downloads with cache controls enabled. Until we can get the time to "fix" this with a workaround in the caching headers, the current solution for IE users is to always select "Save As" from the download dialog, rather than "Open With".

nrbrown

nrbrown

2009-04-28 17:29

reporter   ~0021714

I did a test with "Save As" and got the same result. Is there anything else I could try?

(*Note: I have recommended the use of a different browser to our users, but most prefer IE.)

llattan

llattan

2009-05-06 21:43

reporter   ~0021788

Is this issue related with 0009775 ?

nrbrown

nrbrown

2009-06-19 12:28

reporter   ~0022196

We are now using V1.1.8, but we still have the same issue w/ downloads from IE (IE6 & IE8 tested so far).

nrbrown

nrbrown

2009-06-22 11:30

reporter   ~0022222

I've tested this issue with attachments that have spaces and those that don't and get the same error. Therefore, I don't think this issue is related to 0009775.

nrbrown

nrbrown

2009-06-22 12:42

reporter   ~0022224

In case it helps.

I was able to download TXT & CSV files in IE. Errors still occur on other filetypes (PDF, XLS,DOC).

nrbrown

nrbrown

2009-06-22 14:24

reporter   ~0022226

Another piece to the puzzle: This problem only occurs when using IE over SSL. Downloads done using IE without SSL enabled were successful.

vladimir

vladimir

2009-06-24 02:25

reporter   ~0022252

As described here: http://support.microsoft.com/kb/323308 don't send headers "Cache-control:no-store" and "Cache-control:no-cache" by mantis and by SERVER.

On my nginx server I have global directive "expires 1y" (that add "Expires" and "Cache-control" headers) and set "expires off" (that remove "Expires" and "Cache-control" headers) for *.php files and this fixed incorrect downloading.

But don't set "expires -1" for preventing caching: this add "Cache-control: no-cache" header that breaking downloading in IE over SSL.

Zerstoiber

Zerstoiber

2009-07-08 01:31

reporter   ~0022440

can you please tell us where we can change the Cache-control?

Thanks

hjshih

hjshih

2009-10-08 00:22

reporter   ~0023096

The problem which I met is a little different. The large file (*.rar, over 5MB) can be uploaded successfully and it stores in the server disk. However, when the large file is downloaded, the file size is always zero (IE/Firefox/Chrome are all the same).

My Mantis version is 1.2.0 rc1.

Is there any patch or configuration should be modified? Thanks!

Moritz Both

Moritz Both

2009-10-21 06:50

reporter   ~0023266

In our installation, this appeared in 1.1.6 on Debian lenny. "Save as" didn't work either.

The cause was the use of a server-side proxy server. The client connects to the proxy with https, but the proxy forwards the connection with http. Now mantis thinks IE has no problem with the "Pragma: no-cache" http header and sends it.

I've added a configuration variable $g_always_assume_https which makes mantis think the connection is https even if it is not, so the IE hack avoiding the pragma is always active.

In /etc/mantis/config_local.php I added
$g_always_assume_https = true;

The following patch shows the difference in file_download.php:

--- file_download.php.dist 2009-10-21 11:13:49.000000000 +0200
+++ file_download.php 2009-10-21 11:20:02.000000000 +0200
@@ -105,7 +105,7 @@

attached files via HTTPS, we disable the "Pragma: no-cache"

    # command when IE is used over HTTPS.
    global $g_allow_file_cache;
  • if ( ( isset( $_SERVER["HTTPS"] ) && ( "on" == strtolower( $_SERVER["HTTPS"] ) ) ) && preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) {
  • if ( ( ( isset( $_SERVER["HTTPS"] ) && ( "on" == strtolower( $_SERVER["HTTPS"] ) ) ) || $g_always_assume_https == true ) && preg_match( "/MSIE/", $_SERVER["HTTP_USER_AGENT"] ) ) {

    Suppress "Pragma: no-cache" header.

    } else {
            if ( ! isset( $g_allow_file_cache ) ) {

Good luck,
Moritz

dhx

dhx

2009-10-27 02:19

reporter   ~0023380

I think I may have fixed this in 0011075

Can someone please test my patch?

(snapshot @ http://git.mantisbt.org/?p=mantisbt.git;a=snapshot;h=07c8da02a96216b87842190cca2777e82a668d1f;sf=tgz)

xyz123

xyz123

2009-11-03 18:49

reporter   ~0023560

The patch in issue 0011082 (also 011075) worked for me (1.2.0rc2).

squarebox

squarebox

2010-02-19 02:30

reporter   ~0024437

Last edited: 2010-02-19 02:30

is there a reason this bug isn't linked to 0011075 and closed out? Or are you still waiting for the original reporter to confirm the patch worked for them?

dhx

dhx

2010-03-31 06:09

reporter   ~0024971

Sorry, I wasn't waiting... I just didn't see the update to this issue.

I've marked this as a duplicate of 0011075 as we've received feedback that 0011075 fixes this issue.