Author: toad
Date: 2006-03-24 20:56:37 +0000 (Fri, 24 Mar 2006)
New Revision: 8304
Modified:
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
trunk/freenet/src/freenet/node/Version.java
Log:
567: Fix filter bugs.
Modified:
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
---
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
2006-03-24 20:02:46 UTC (rev 8303)
+++
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
2006-03-24 20:56:37 UTC (rev 8304)
@@ -8,6 +8,7 @@
import freenet.pluginmanager.HTTPRequest;
import freenet.support.Logger;
import freenet.support.HTMLEncoder;
+import freenet.support.URLEncoder;
public class GenericReadFilterCallback implements FilterCallback {
@@ -27,6 +28,15 @@
return null;
}
String path = uri.getPath();
+ if (path == null) {
+ // Only fragment?
+ if(uri.getScheme() == null && uri.getFragment() != null
&&
+ uri.getHost() == null) {
+ return "#" +
URLEncoder.encode(uri.getFragment());
+ }
+ return null;
+ }
+ // mailto: not supported yet - FIXME what to do with it? what
queries are allowed? can it possibly hurt us? how to construct safely? etc
if (path.startsWith("/") && path.substring(1).indexOf("/") ==
-1) {
// allow links to the root to add bookmarks
HTTPRequest req = new HTTPRequest(uri);
Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-03-24 20:02:46 UTC (rev
8303)
+++ trunk/freenet/src/freenet/node/Version.java 2006-03-24 20:56:37 UTC (rev
8304)
@@ -20,7 +20,7 @@
public static final String protocolVersion = "1.0";
/** The build number of the current revision */
- private static final int buildNumber = 566;
+ private static final int buildNumber = 567;
/** Oldest build of Fred we will talk to */
private static final int lastGoodBuild = 507;