Author: nextgens
Date: 2006-05-21 13:42:57 +0000 (Sun, 21 May 2006)
New Revision: 8818

Modified:
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
Log:
13:33 < Zothar> nextgens: side note while I have you here, perhaps you know 
something about 
                this?: clients/http/filter/GenericReadFilterCallback.java uses 
or overrides a 
                deprecated API.

Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-05-21 13:29:03 UTC (rev 8817)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2006-05-21 13:42:57 UTC (rev 8818)
@@ -1,6 +1,7 @@
 package freenet.clients.http.filter;

 import java.net.MalformedURLException;
+import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URLEncoder;
@@ -127,9 +128,13 @@
                        String p = path;
                        if(typeOverride != null)
                                p += "?type="+typeOverride;
-                       if(u.getFragment() != null)
+                       if(u.getFragment() != null){
+                               try{
                                // FIXME encode it properly
-                               p += URLEncoder.encode(u.getFragment());
+                                       p += 
URLEncoder.encode(u.getFragment(),"UTF-8");
+                               }catch (UnsupportedEncodingException e1){
+                               }
+                       }
                        return null;
                }
        }


Reply via email to