You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "David Jencks (JIRA)" <ji...@apache.org> on 2007/03/19 05:36:09 UTC
[jira] Resolved: (GERONIMO-2982) servlet-mapping url patterns may
need "/" prepended
[ https://issues.apache.org/jira/browse/GERONIMO-2982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks resolved GERONIMO-2982.
------------------------------------
Resolution: Fixed
Assignee: Greg Wilkins (was: David Jencks)
Changed in rev 519834 to prepend "/" to a path url pattern if missing. Greg, is this reasonable?
thanks
UrlPatternType[] urlPatterns = servletMappingType.getUrlPatternArray();
for (UrlPatternType patternType : urlPatterns) {
String urlPattern = patternType.getStringValue().trim();
if (!urlPattern.startsWith("*") && !urlPattern.startsWith("/")) {
urlPattern = "/" + urlPattern;
}
if (!knownServletMappings.contains(urlPattern)) {
knownServletMappings.add(urlPattern);
checkString(urlPattern);
Set<String> urlsForServlet = servletMappings.get(servletName);
if (urlsForServlet == null) {
urlsForServlet = new HashSet<String>();
servletMappings.put(servletName, urlsForServlet);
}
urlsForServlet.add(urlPattern);
}
}
}
> servlet-mapping url patterns may need "/" prepended
> ---------------------------------------------------
>
> Key: GERONIMO-2982
> URL: https://issues.apache.org/jira/browse/GERONIMO-2982
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: Jetty
> Affects Versions: 2.0-M3
> Reporter: David Jencks
> Assigned To: Greg Wilkins
> Fix For: 2.0-beta1
>
>
> Apparently if we find a servlet-mapping url-pattern that doesn't start with / or * we should treat it as if it starts with /, such as by prepending / before further processing. I haven't tracked down the spec support for this behavior and could use some advice from greg on whether its actually reasonable.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.