Author: jflesch
Date: 2007-08-07 13:54:38 +0000 (Tue, 07 Aug 2007)
New Revision: 14504

Modified:
   trunk/freenet/src/freenet/clients/http/PluginToadlet.java
   trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
Log:
Revert r14443 : It prevents to load plugins who are already in the classpath of 
the node

Modified: trunk/freenet/src/freenet/clients/http/PluginToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PluginToadlet.java   2007-08-07 
13:04:30 UTC (rev 14503)
+++ trunk/freenet/src/freenet/clients/http/PluginToadlet.java   2007-08-07 
13:54:38 UTC (rev 14504)
@@ -149,6 +149,7 @@
                StringBuffer replyBuffer = new StringBuffer();
                if ("add".equals(action)) {
                        pluginName = httpRequest.getPartAsString("pluginName", 
MAX_PLUGIN_NAME_LENGTH);
+
                        boolean added = false;
                        try {
                                pluginManager.addPlugin(pluginName, true);

Modified: trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2007-08-07 
13:04:30 UTC (rev 14503)
+++ trunk/freenet/src/freenet/clients/http/PproxyToadlet.java   2007-08-07 
13:54:38 UTC (rev 14504)
@@ -113,10 +113,7 @@

                        if (request.isPartSet("load")) {
                                if(Logger.shouldLog(Logger.MINOR, this)) 
Logger.minor(this, "Loading "+request.getPartAsString("load", 
MAX_PLUGIN_NAME_LENGTH));
-                               String toLoad = request.getPartAsString("load", 
MAX_PLUGIN_NAME_LENGTH);
-                               if (toLoad.indexOf("@") < 0)
-                                       toLoad = "*@file://"+toLoad;
-                               pm.startPlugin(toLoad, true);
+                               pm.startPlugin(request.getPartAsString("load", 
MAX_PLUGIN_NAME_LENGTH), true);
                                //writeReply(ctx, 200, "text/html", "OK", 
mkForwardPage("Loading plugin", "Loading plugin...", ".", 5));

                                headers.put("Location", ".");


Reply via email to