[jbossws-issues] [JBoss JIRA] Created: (JBWS-1808) BackwardCompatibleURLPatternDeploymentAspect is mangling valid URLpatterns

Andrew Dinn (JIRA) jira-events at lists.jboss.org
Thu Sep 13 05:58:11 EDT 2007


BackwardCompatibleURLPatternDeploymentAspect is mangling valid URLpatterns
--------------------------------------------------------------------------

                 Key: JBWS-1808
                 URL: http://jira.jboss.com/jira/browse/JBWS-1808
             Project: JBoss Web Services
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: jbossws-2.1.0
            Reporter: Andrew Dinn
            Priority: Minor


BackwardCompatibleURLPatternDeploymentAspect overrides method getExplicitPattern to check for and remove any leading context root in a servlet mapping URL pattern e.g. if the context root is "/provider" and the URL pattern is "/provider/services/* it 'corrects' the URL pattern to "/services/*". However, it is over-eager. For example, if the context root is "/provider" and the URL pattern is "/providerservices/*" then the pattern is mangled to "services/*" causing problems down the line. The check at line 59 needs to be modified a follows

         StringTokenizer st = new StringTokenizer(urlPattern, "/");
 -       if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot))
 +       if (st.countTokens() > 1 && urlPattern.startsWith(contextRoot + "/"))
         {
            urlPattern = urlPattern.substring(contextRoot.length());
         }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list