You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Terrence Szeto <ts...@sympatico.ca> on 2003/05/04 20:03:16 UTC

IE and URL rewrite causes files downloaded to lose extensions

Hi everyone.

I've done some testing, and I've noticed that IE has some difficulties
dealing with URL rewriting with file downloads.

I have setup, Tomcat 4.0.4, (tested also on Tomcat 4.1) and using IE 6.
Tomcat has been setup to use URL rewriting (no cookies), and this is where
the problem is.

If my file is named "test.exe", the URL will look something like so.
http://mydomain.com/test.exe;jsession=1209ad09823tasdlfkj
or something like so correct?

When IE attempts to download this file, the extension is somehow STRIPPED,
leaving the file to be saved as "test".

Is there ANY way around this?

Well, to answer my own question yes, I've been adding an additional header
and value:
"Content-disposition: attachment; filename=newName.zzz"
where newName.zzz is the file name derived from the URL. (I used a 
Filter to
run through and do all of that).

Now, an additional problem occurs.

When downloading files with multiple '.' characters, IE pads on square
brackets to the file name.

If my file name is "test1.1.exe"
IE handles this with the above implementation as: "test1[1].1.exe"

Anyone have ideas on what this is? or if anyone has solutions to this?

Thanks  



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org