Author: jflesch
Date: 2007-07-30 20:26:09 +0000 (Mon, 30 Jul 2007)
New Revision: 14443
Modified:
trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
Log:
Make the plugins easier to load by making the usual prefix '*@file://' optionnal
Modified: trunk/freenet/src/freenet/clients/http/PproxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/PproxyToadlet.java 2007-07-30
14:22:37 UTC (rev 14442)
+++ trunk/freenet/src/freenet/clients/http/PproxyToadlet.java 2007-07-30
20:26:09 UTC (rev 14443)
@@ -113,7 +113,10 @@
if (request.isPartSet("load")) {
if(Logger.shouldLog(Logger.MINOR, this))
Logger.minor(this, "Loading "+request.getPartAsString("load",
MAX_PLUGIN_NAME_LENGTH));
- pm.startPlugin(request.getPartAsString("load",
MAX_PLUGIN_NAME_LENGTH), true);
+ String toLoad = request.getPartAsString("load",
MAX_PLUGIN_NAME_LENGTH);
+ if (toLoad.indexOf("@") < 0)
+ toLoad = "*@file://"+toLoad;
+ pm.startPlugin(toLoad, true);
//writeReply(ctx, 200, "text/html", "OK",
mkForwardPage("Loading plugin", "Loading plugin...", ".", 5));
headers.put("Location", ".");