cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r687109 - in /cocoon/whiteboard/corona/trunk: corona-sample/src/main/resources/COB-INF/ corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/ corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/
Date Tue, 19 Aug 2008 17:52:42 GMT
Author: reinhard
Date: Tue Aug 19 10:52:41 2008
New Revision: 687109

URL: http://svn.apache.org/viewvc?rev=687109&view=rev
Log:
fix handling of trailing slash in request URIs

Modified:
    cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/WildcardMatcher.java
    cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java

Modified: cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap?rev=687109&r1=687108&r2=687109&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/whiteboard/corona/trunk/corona-sample/src/main/resources/COB-INF/sitemap.xmap Tue
Aug 19 10:52:41 2008
@@ -61,7 +61,7 @@
 
     <!-- ~~~~~~~~~~~~~~~~ sax pipelines ~~~~~~~~~~~~~~~ -->
     <map:pipeline>
-      <map:match pattern="sax-pipeline/simple">
+      <map:match equals="sax-pipeline/simple">
         <map:generate src="sax-pipeline/simple.xml" />
         <map:transform src="sax-pipeline/simple.xslt">
           <map:parameter name="myParam" value="1" />

Modified: cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/WildcardMatcher.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/WildcardMatcher.java?rev=687109&r1=687108&r2=687109&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/WildcardMatcher.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/matcher/WildcardMatcher.java
Tue Aug 19 10:52:41 2008
@@ -29,13 +29,8 @@
             return null;
         }
 
-        Map<String, String> matchingResult = null;
-        if (testValue.startsWith("/")) {
-            testValue = testValue.substring(1);
-        }
-
         WildcardExpressionRewriter rewriter = new WildcardExpressionRewriter(expression);
-        matchingResult = WildcardMatcherHelper.match(rewriter.rewrittenExpression, testValue);
+        Map<String, String> matchingResult = WildcardMatcherHelper.match(rewriter.rewrittenExpression,
testValue);
         Map<String, String> parameterGroups = rewriter.getParameters();
 
         if (matchingResult == null) {

Modified: cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java?rev=687109&r1=687108&r2=687109&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sitemap/src/main/java/org/apache/cocoon/corona/sitemap/node/MatchNode.java
Tue Aug 19 10:52:41 2008
@@ -80,6 +80,9 @@
         String testValue = invocation.resolveParameter(this.value);
         if (testValue == null) {
             testValue = invocation.getRequestURI();
+            if (testValue.startsWith("/")) {
+                testValue = testValue.substring(1);
+            }
         }
 
         // create the matching context based on the used matching attributes (regexp, equals,
etc.)



Mime
View raw message