maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r662144 - /maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
Date Sun, 01 Jun 2008 04:01:58 GMT
Author: joakime
Date: Sat May 31 21:01:57 2008
New Revision: 662144

URL: http://svn.apache.org/viewvc?rev=662144&view=rev
Log:
Fixing URL decoding.

Modified:
    maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java?rev=662144&r1=662143&r2=662144&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
Sat May 31 21:01:57 2008
@@ -21,8 +21,10 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.net.URISyntaxException;
+import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -174,13 +176,15 @@
             {
                 ret = ret.substring( baseURI.getPath().length() );
             }
-            // TODO: Fix string escaping properly.
-            ret = StringUtils.replace( ret, "%20", " " );
-            ret = StringUtils.replace( ret, "+", " " );
+            
+            ret = URLDecoder.decode( ret, "UTF-8" );
         }
         catch ( URISyntaxException e )
         {
         }
+        catch ( UnsupportedEncodingException e )
+        {
+        }
 
         return ret;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message