IBM Connections: File download with IE 9 without [1] on extension

· by Christoph Stoettner · Read in about 2 min · (256 words)

File download with Internet Explorer 9 modifies the file extension and so files can’t open with any installed application. Problem occurs with IBM Connections 3.0.1 and 3.0.1 with installed CR3.

IE 9 isn’t supported in the moment, but with a little tweak on IHS side, it is possible, that IE 9 download files without modifying the extension.

Biggest problem here is, that opening attachments will open the “Open with” dialog, because no application is linked to a file extension .pdf1.

Normal file download with IE9 and IBM Connections:

ie9 download 1

The http header shows following line for the download file and the name:

Content-Disposition: attachment; filename*=UTF-8'en'%42%6f%6e%75%73%20%53%79%73%74%65%6d%20%76%32%2e%70%70%74%78; size=2563575; creation-date="Fri, 2 Mar 2012 13:37:39 +0100"; modification-date="Fri, 2 Mar 2012 13:37:39 +0100";

Sjaak Ursinus shows modifying http headers to solve issues with Chrome and IBM Connections Files. I made some tests with his explanation and added some lines in http.conf (you have to enable mod_headers and mod_setenvif):

<IfModule mod_setenvif.c>
  SetEnvIf User-Agent "MSIE 9\." IE9
    <IfModule mod_headers.c>
      Header edit Content-Disposition "^(.*)filename\*=UTF-8['a-z]{4}(.*)$" "$1filename*=$2" env=IE9
    </IfModule>
</IfModule><br />

What does this part of the http.conf?

I set an environment variable IE9, if the user agent contains “MSIE 9”.

The Header edit removes UTF-8’de’ from filename, if the environment variable is IE9 (env=IE9). I modified the regexp, that all languages after UTF-8 were removed. So the http header looks like this:

Content-Disposition: attachment; filename*=%43%41%54%20%53%63%68%6c%c3%bc%73%73%65%6c%2e%65%6d%6c; size=7637; creation-date="Fri, 30 Dec 2011 10:44:20 +0100"; modification-date="Fri, 30 Dec 2011 10:44:20 +0100";

ie9 download 2

So you can open the file and it will be opened with the linked application for this extension.