You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by fm...@apache.org on 2008/02/15 16:13:26 UTC

svn commit: r628083 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java

Author: fmeschbe
Date: Fri Feb 15 07:13:26 2008
New Revision: 628083

URL: http://svn.apache.org/viewvc?rev=628083&view=rev
Log:
No need to decode the URI string in resolve(String uri) as either
this string is provided by any servlet or script, where it certainly
is not encoded, or by the resolve(HttpServletRequest) method which
uses the HttpServletRequest.getPathInfo() value, which is decoded
by the servlet container according to the API spec.

Modified:
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=628083&r1=628082&r2=628083&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Fri Feb 15 07:13:26 2008
@@ -99,15 +99,6 @@
      */
     public Resource resolve(String uri) throws SlingException {
 
-        // decode the request URI (required as the servlet container does not
-        try {
-            uri = URLDecoder.decode(uri, "UTF-8");
-        } catch (UnsupportedEncodingException uee) {
-            log.error("Cannot decode request URI using UTF-8", uee);
-        } catch (Exception e) {
-            log.error("Failed to decode request URI " + uri, e);
-        }
-
         // resolve virtual uri
         String realUrl = factory.virtualToRealUri(uri);
         if (realUrl != null) {