Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: ivarss on January 08, 2009, 06:20:20 PM

Title: download attachments with Internet Explorer
Post by: ivarss on January 08, 2009, 06:20:20 PM
Hi there,
I'm using roundcube v0.2 beta behind a proxy.

I'm having a problem downloading attachments with IE7 and IE6. Other browsers I've tested are OK (Opera, Firefox and Safari on both Windows and Linux/OSX).
Whenever I try to download attachment with IE, I get this error box:

---------------------------
Windows Internet Explorer
---------------------------
Internet Explorer cannot download / from mysite.my.net

Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found.  Please try again later.
---------------------------
OK  
---------------------------
 

Any hints?
Ivars
Title: download attachments with Internet Explorer
Post by: Pescao on February 11, 2009, 04:14:19 PM
I'm finding the same problem with "0.2 stable". Any news about it?

Thanks,
David.
Title: download attachments with Internet Explorer
Post by: rosali on February 12, 2009, 03:45:24 AM
Could you please post the link to download (header section of preview pane)?
Title: download attachments with Internet Explorer
Post by: jjhunt on February 16, 2009, 05:31:21 PM
We're seeing this error as well.   We're just getting ready to put RoundCube in production, and would like to know the status of this issue.  Thanks so much for any assistance!

Jackie Hunt
ACNS
Colorado State University
Title: download attachments with Internet Explorer
Post by: jjhunt on February 17, 2009, 12:55:48 PM
I did some research last night, and I think the issue is related to using SSL and how IE enforces a no-cache header.  It's described in detail in:

Internet Explorer is unable to open Office documents from an SSL Web site (http://support.microsoft.com/default.aspx?scid=kb;en-us;316431)

The problem seems to be that a no-cache request is sent in the header, and looking at the RoundCube code, I do see several files that have a no-cache request in them.  In v0.2 stable a grep of the RoundCube source shows these files with no-cache requests:

"./program/include/rcube_shared.inc", Line 41:   header("Pragma: no-cache");
"./program/js/tiny_mce/plugins/spellchecker/rpc.php", Line 16: header("Cache-Control: no-store, no-cache, must-revalidate");
"./program/js/tiny_mce/plugins/spellchecker/rpc.php", Line 18: header("Pragma: no-cache");

Can someone provide some insight on the no-cache setting, and what the ramifications are of removing them?  

Thanks!
Jackie
Title: download attachments with Internet Explorer
Post by: jjhunt on February 24, 2009, 12:13:09 PM
I fixed this problem at our site, and I'm posting the solution in the hopes that it will help someone in the future.

Looking further into the problem, I found the RoundCube, did indeed have code in place to handle this oddity with IE of not being able to download when SSL was enabled.  In the ~/program/include/rcube_shared.inc file I saw the code:

 // We need to set the following headers to make downloads work using IE in HTTPS mode.
  if (isset($_SERVER['HTTPS'])) {
    header('Pragma: ');
    header('Cache-Control: ');
  }

This turns off caching for SSL connections.  So, my issue was why wasn't this code being executed on our site?  The variable being tested 'HTTPS' was indeed not set for our virtual host, I was able to verify that by creating a simple php script with the phpinfo() command in it.  HTTPS was not part of the environment.

However, I did find that when I connected to our server using ServerName, I did see the HTTPS environment variable set.  Hmmm, that was strange.  Looking further, I learned the HTTPS variable is set by mod ssl.  I had mod ssl loaded, but only enabled for the default Virtual Host.  I was generating https URLs using the Rewrite command.  I had not enabled the SSLEngine in the specific virtual host definition I had setup for RoundCube.  As soon as I did that, downloads from IE worked great.

Hoping this can save someone else some time!
Jackie
Title: download attachments with Internet Explorer
Post by: anybody on September 01, 2009, 05:38:47 AM
@jjhunt

Thank you VERY much for posting this explanation. This has helped me to quickly diagnose and fix the problem.

I've fixed it by adding a
Quote
SetEnv HTTPS on

to the SSL virtualhost definition. Might not be the way it's supposed to be set, but works perfectly :-)
Title: download attachments with Internet Explorer
Post by: Granada on October 04, 2010, 02:20:21 AM
Now this old problem seems to be present again, at least on our installation of RC0.4. We've checked all hints in this thread and the Microsoft article, but saving messages still won't work with Internet Explorer when RC runs on Port 443. Did Microsoft change anything so that the nocache-Pragma is now broken again? :confused:

Regards
Ruediger