maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r660507 - /maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
Date Tue, 27 May 2008 13:31:18 GMT
Author: brett
Date: Tue May 27 06:31:15 2008
New Revision: 660507

URL: http://svn.apache.org/viewvc?rev=660507&view=rev
Log:
correct whitespace encoding without encoding path separators

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

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java?rev=660507&r1=660506&r2=660507&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
Tue May 27 06:31:15 2008
@@ -331,7 +331,12 @@
         
         resource.setLastModified( source.lastModified() );
         
-        String url = getRepository().getUrl() + "/" + URLEncoder.encode( resource.getName()
);
+        String url = getRepository().getUrl();
+        String[] parts = StringUtils.split( resource.getName(), "/" );
+        for ( int i = 0; i < parts.length; i++ )
+        {
+            url += "/" + URLEncoder.encode( parts[i] );
+        }
 
         PutMethod putMethod = new PutMethod( url );
         InputStream is = null;



---------------------------------------------------------------------
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