labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r903628 - /labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
Date Wed, 27 Jan 2010 12:55:26 GMT
Author: simoneg
Date: Wed Jan 27 12:55:23 2010
New Revision: 903628

URL: http://svn.apache.org/viewvc?rev=903628&view=rev
Log:
Different url parsing between different containers, better not to use "+" in urls

Modified:
    labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java

Modified: labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java?rev=903628&r1=903627&r2=903628&view=diff
==============================================================================
--- labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
(original)
+++ labs/magma/trunk/foundation-website/src/main/java/org/apache/magma/website/context/WebMethodContextElement.java
Wed Jan 27 12:55:23 2010
@@ -66,7 +66,13 @@
 						try {
 							sb.append(WebHandler.paramSeparator);
 							try {
-								sb.append(URLEncoder.encode(converter.to(object), "UTF-8"));
+								String converted = URLEncoder.encode(converter.to(object), "UTF-8"); 
+								// Jetty and Tomcat behaves differently in regard to "+" in path info.
+								// Jetty does not parse it while Tomcat converts it to space.
+								// Better not to have "+" at all.
+								converted = converted.replaceAll("\\+", "%20");
+	
+								sb.append(converted);
 							} catch (UnsupportedEncodingException e) {
 								// Should never happen for UTF-8
 							}



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


Mime
View raw message