Author: toad
Date: 2006-12-12 03:12:15 +0000 (Tue, 12 Dec 2006)
New Revision: 11354

Modified:
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
Don't offer to download as original type if application/x-msdownload or 
application/octet-stream.

Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2006-12-12 
02:58:27 UTC (rev 11353)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2006-12-12 
03:12:15 UTC (rev 11354)
@@ -183,9 +183,11 @@
                        option = optionList.addChild("li");
                        option.addChild("a", "href", basePath + key.toString() 
+ "?forcedownload"+extras, "Click here");
                        option.addChild("#", " to force your browser to 
download the file to disk.");
-                       option = optionList.addChild("li");
-                       option.addChild("a", "href", basePath + key.toString() 
+ "?force=" + getForceValue(key, now)+extras, "Click here");
-                       option.addChild("#", " to open the file as " + mimeType 
+ '.');
+                       if(!(mimeType.equals("application/octet-stream") || 
mimeType.equals("application/x-msdownload"))) {
+                               option = optionList.addChild("li");
+                               option.addChild("a", "href", basePath + 
key.toString() + "?force=" + getForceValue(key, now)+extras, "Click here");
+                               option.addChild("#", " to open the file as " + 
mimeType + '.');
+                       }
                        if(referrer != null) {
                                option = optionList.addChild("li");
                                option.addChild("a", "href", referrer, "Click 
here");


Reply via email to