Author: toad
Date: 2006-04-26 19:48:08 +0000 (Wed, 26 Apr 2006)
New Revision: 8581

Modified:
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
   trunk/freenet/src/freenet/node/Version.java
Log:
657: Fix index.html#blah bug (#337).

Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-04-26 19:18:59 UTC (rev 8580)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-04-26 19:48:08 UTC (rev 8581)
@@ -69,11 +69,11 @@
                        // FIXME resolve it
                        // FIXME Note that we allow links to / inlines from 
fproxy services.
                        // This is okay because we don't allow forms.
-                       return finishProcess(req, overrideType, path);
+                       return finishProcess(req, overrideType, path, uri);
                }
        }

-       private String finishProcess(HTTPRequest req, String overrideType, 
String path) {
+       private String finishProcess(HTTPRequest req, String overrideType, 
String path, URI u) {
                String typeOverride = req.getParam("type", null);
                if(overrideType != null)
                        typeOverride = overrideType;
@@ -83,6 +83,8 @@
                String ret = path;
                if(typeOverride != null)
                        ret = ret + "?type=" + typeOverride;
+               if(u.getFragment() != null)
+                       ret = ret + "#" + u.getFragment();
                return ret;
        }

@@ -90,7 +92,7 @@
                // Valid freenet URI, allow it
                // Now what about the queries?
                HTTPRequest req = new HTTPRequest(uri);
-               return finishProcess(req, overrideType, "/" + 
furi.toString(false));
+               return finishProcess(req, overrideType, "/" + 
furi.toString(false), uri);
        }

 }

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-04-26 19:18:59 UTC (rev 
8580)
+++ trunk/freenet/src/freenet/node/Version.java 2006-04-26 19:48:08 UTC (rev 
8581)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

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

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


Reply via email to