You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by si...@apache.org on 2010/01/27 13:55:26 UTC

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

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