Author: toad
Date: 2009-01-07 17:23:48 +0000 (Wed, 07 Jan 2009)
New Revision: 24960

Modified:
   trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
Log:
Replace fetch-it-even-though-it's-too-big button with a link.
IMHO there is no security risk here; prefetching agents might timeout but so 
what.


Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2009-01-07 
17:15:37 UTC (rev 24959)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java   2009-01-07 
17:23:48 UTC (rev 24960)
@@ -499,11 +499,9 @@
                                HTMLNode optionList = 
infoboxContent.addChild("ul");
                                if(!restricted) {
                                        option = optionList.addChild("li");
-                                       HTMLNode optionForm = 
option.addChild("form", new String[] { "action", "method" }, new String[] {'/' 
+ key.toString(), "get" });
-                                       optionForm.addChild("input", new 
String[] { "type", "name", "value" }, new String[] { "hidden", "max-size", 
String.valueOf(e.expectedSize == -1 ? Long.MAX_VALUE : e.expectedSize*2) });
-                                       optionForm.addChild("input", new 
String[] { "type", "name", "value" }, new String[] { "submit", "fetch", 
l10n("fetchLargeFileAnywayAndDisplay") });
+                                       option.addChild("a", "href", 
ctx.fixLink("/" + key.toString() + "?max-size="+String.valueOf(e.expectedSize 
== -1 ? Long.MAX_VALUE : e.expectedSize*2)), 
l10n("fetchLargeFileAnywayAndDisplay"));
                                        option = optionList.addChild("li");
-                                       optionForm = ctx.addFormChild(option, 
"/queue/", "tooBigQueueForm");
+                                       HTMLNode optionForm = 
ctx.addFormChild(option, "/queue/", "tooBigQueueForm");
                                        optionForm.addChild("input", new 
String[] { "type", "name", "value" }, new String[] { "hidden", "key", 
key.toString() });
                                        optionForm.addChild("input", new 
String[] { "type", "name", "value" }, new String[] { "hidden", "return-type", 
"disk" });
                                        optionForm.addChild("input", new 
String[] { "type", "name", "value" }, new String[] { "hidden", "persistence", 
"forever" });

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to