Author: nextgens
Date: 2006-12-02 19:27:37 +0000 (Sat, 02 Dec 2006)
New Revision: 11197

Modified:
   trunk/freenet/src/freenet/clients/http/QueueToadlet.java
Log:
maybe fix #889 forcing the form encoding to UTF8

Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-12-02 
18:59:30 UTC (rev 11196)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java    2006-12-02 
19:27:37 UTC (rev 11197)
@@ -246,7 +246,7 @@
                                                                        
HTMLNode alertContent = ctx.getPageMaker().getContentNode(alertNode);
                                                                        
alertContent.addChild("#", "The file you want to download is currently not 
filtered by Freenet\u2019s content filter! That means that your anonymity can 
be compromised by opening the file!");
                                                                        
HTMLNode optionListNode = alertContent.addChild("ul");
-                                                                       
HTMLNode optionForm = optionListNode.addChild("li").addChild("form", new 
String[] { "action", "method" }, new String[] { "/queue/", "post" });
+                                                                       
HTMLNode optionForm = optionListNode.addChild("li").addChild("form", new 
String[] { "action", "method", "enctype", "encoding" }, new String[] { 
"/queue/", "post", "UTF-8", "multipart/form-data" });
                                                                        
optionForm.addChild(ctx.getPageMaker().createFormPasswordInput(core.formPassword));
                                                                        
optionForm.addChild("input", new String[] { "type", "name", "value" }, new 
String[] { "hidden", "identifier", identifier });
                                                                        
optionForm.addChild("input", new String[] { "type", "name", "value" }, new 
String[] { "hidden", "forceDownload", 
String.valueOf(System.currentTimeMillis()) });
@@ -671,7 +671,7 @@

        private HTMLNode createPriorityCell(PageMaker pageMaker, String 
identifier, short priorityClass) {
                HTMLNode priorityCell = new HTMLNode("td", "class", 
"request-priority nowrap");
-               HTMLNode priorityForm = priorityCell.addChild("form", new 
String[] { "action", "method" }, new String[] { "/queue/", "post" });
+               HTMLNode priorityForm = priorityCell.addChild("form", new 
String[] { "action", "method", "enctype", "encoding" }, new String[] { 
"/queue/", "post", "UTF-8", "multipart/form-data" });
                
priorityForm.addChild(pageMaker.createFormPasswordInput(core.formPassword));
                priorityForm.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "hidden", "identifier", identifier });
                HTMLNode prioritySelect = priorityForm.addChild("select", 
"name", "priority");
@@ -688,7 +688,7 @@

        private HTMLNode createDeleteCell(PageMaker pageMaker, String 
identifier, ClientRequest clientRequest) {
                HTMLNode deleteNode = new HTMLNode("td", "class", 
"request-delete");
-               HTMLNode deleteForm = deleteNode.addChild("form", new String[] 
{ "action", "method" }, new String[] { "/queue/", "post" });
+               HTMLNode deleteForm = deleteNode.addChild("form", new String[] 
{ "action", "method", "enctype", "encoding" }, new String[] { "/queue/", 
"post", "UTF-8", "multipart/form-data" });
                
deleteForm.addChild(pageMaker.createFormPasswordInput(core.formPassword));
                deleteForm.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "hidden", "identifier", identifier });
                deleteForm.addChild("input", new String[] { "type", "name", 
"value" }, new String[] { "submit", "remove_request", "Delete" });
@@ -696,7 +696,7 @@
                // If it's failed, offer to restart it

                if(clientRequest.hasFinished() && !clientRequest.hasSucceeded() 
&& clientRequest.canRestart()) {
-                       HTMLNode retryForm = deleteNode.addChild("form", new 
String[] { "action", "method" }, new String[] { "/queue/", "post" });
+                       HTMLNode retryForm = deleteNode.addChild("form", new 
String[] { "action", "method", "enctype", "encoding" }, new String[] { 
"/queue/", "post", "UTF-8", "multipart/form-data" });
                        
retryForm.addChild(pageMaker.createFormPasswordInput(core.formPassword));
                        retryForm.addChild("input", new String[] { "type", 
"name", "value" }, new String[] { "hidden", "identifier", identifier });
                        retryForm.addChild("input", new String[] { "type", 
"name", "value" }, new String[] { "submit", "restart_request", "Retry" });
@@ -775,7 +775,7 @@
                /* the insert file box */
                HTMLNode insertBox = pageMaker.getInfobox("Insert File");
                HTMLNode insertContent = pageMaker.getContentNode(insertBox);
-               HTMLNode insertForm = insertContent.addChild("form", new 
String[] { "action", "method", "enctype" }, new String[] { ".", "post", 
"multipart/form-data" });
+               HTMLNode insertForm = insertContent.addChild("form", new 
String[] { "action", "method", "enctype", "encoding" }, new String[] { 
"/queue/", "post", "UTF-8", "multipart/form-data" });
                
insertForm.addChild(pageMaker.createFormPasswordInput(core.formPassword));
                insertForm.addChild("#", "Insert as: ");
                insertForm.addChild("input", new String[] { "type", "name", 
"value", "checked" }, new String[] { "radio", "keytype", "chk", "checked" });


Reply via email to