roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r385616 - /incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java
Date Mon, 13 Mar 2006 18:33:30 GMT
Author: snoopdave
Date: Mon Mar 13 10:33:29 2006
New Revision: 385616

URL: http://svn.apache.org/viewcvs?rev=385616&view=rev
Log:
Fix for ROL-1065: plug sign in resource URL leads to exception

Modified:
    incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java

Modified: incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java?rev=385616&r1=385615&r2=385616&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/servlets/ResourceServlet.java Mon Mar
13 10:33:29 2006
@@ -62,7 +62,15 @@
         String servlet = request.getServletPath();
         String reqURI = request.getRequestURI();
         
-        // url decoding
+        // URL decoding
+        
+        // Fix for ROL-1065: even though a + should mean space in a URL, folks 
+        // who upload files with plus signs expect them to work without 
+        // escaping. This is essentially what other systems do (e.g. JIRA) to 
+        // enable this.
+        reqURI = reqURI.replaceAll("\\+", "%2B");
+        
+        // now we really decode the URL
         reqURI = URLDecoder.decode(reqURI, "UTF-8");
         
         // calculate the path of the requested resource



Mime
View raw message