Author: toad
Date: 2006-05-18 19:25:04 +0000 (Thu, 18 May 2006)
New Revision: 8775

Modified:
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
   trunk/freenet/src/freenet/node/Version.java
Log:
724: Another content filter fix.

Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-05-18 19:13:36 UTC (rev 8774)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-05-18 19:25:04 UTC (rev 8775)
@@ -69,9 +69,27 @@
                        return 
"/?newbookmark="+bookmark_key+"&desc="+bookmark_desc;
                }

+               // Try as an absolute URI
+               
+               String rpath = uri.getPath();
+               if(rpath != null) {
+                       Logger.minor(this, "Resolved URI: "+rpath);
+                       
+                       // Valid FreenetURI?
+                       try {
+                               String p = rpath;
+                               while(p.startsWith("/")) p = p.substring(1);
+                               FreenetURI furi = new FreenetURI(p);
+                               Logger.minor(this, "Parsed: "+furi);
+                               return processURI(furi, uri, overrideType, 
noRelative);
+                       } catch (MalformedURLException e) {
+                               // Not a FreenetURI
+                       }
+               }
+               
                // Probably a relative URI.

-               String rpath = resolved.getPath();
+               rpath = resolved.getPath();
                if(rpath == null) return null;
                Logger.minor(this, "Resolved URI: "+rpath);


Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-05-18 19:13:36 UTC (rev 
8774)
+++ trunk/freenet/src/freenet/node/Version.java 2006-05-18 19:25:04 UTC (rev 
8775)
@@ -18,7 +18,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 723;
+       private static final int buildNumber = 724;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 698;


Reply via email to