commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r410367 - in /jakarta/commons/proper/httpclient/trunk/src: java/org/apache/commons/httpclient/URI.java test/org/apache/commons/httpclient/TestURI.java
Date Tue, 30 May 2006 20:40:12 GMT
Author: olegk
Date: Tue May 30 13:40:11 2006
New Revision: 410367

URL: http://svn.apache.org/viewvc?rev=410367&view=rev
Log:
Fix for HTTPCLIENT-578: literal plus (+) character in path components of HttpURL is not preserved

Contributed by Jeremy Norris <jnorris10 at gmail.com>

Modified:
    jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
    jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java

Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java?rev=410367&r1=410366&r2=410367&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/URI.java
Tue May 30 13:40:11 2006
@@ -1552,6 +1552,7 @@
         allowed_abs_path.or(abs_path);
         // allowed_abs_path.set('/');  // aleady included
         allowed_abs_path.andNot(percent);
+        allowed_abs_path.clear('+');
     }
 
 
@@ -1563,6 +1564,7 @@
     static {
         allowed_rel_path.or(rel_path);
         allowed_rel_path.clear('%');
+        allowed_rel_path.clear('+');
     }
 
 

Modified: jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java?rev=410367&r1=410366&r2=410367&view=diff
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
(original)
+++ jakarta/commons/proper/httpclient/trunk/src/test/org/apache/commons/httpclient/TestURI.java
Tue May 30 13:40:11 2006
@@ -252,5 +252,10 @@
         assertEquals(escaped, new String(u2.getRawURI()));
         assertEquals(unescaped, u2.getURI());        
     }
+
+    public void testBug578() throws Exception {
+        HttpURL url = new HttpURL("http://localhost/test+test");
+        assertEquals("/test+test", url.getPath());
+    }
     
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message