Skip to content

Commit

Permalink
Only explicitly return the stylesheet in WadlGenerator and not other …
Browse files Browse the repository at this point in the history
…URLs (#1749)
  • Loading branch information
coheigea authored Mar 15, 2024
1 parent bc28b0c commit df2241c
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,17 @@ protected void doFilter(ContainerRequestContext context, Message m) {
if (path.startsWith("/") && !path.isEmpty()) {
path = path.substring(1);
}
if (stylesheetReference != null && path.endsWith(".xsl")
|| docLocationMap.containsKey(path)) {

if (docLocationMap.containsKey(path)) {
context.abortWith(getExistingResource(m, ui, path));
} else if (stylesheetReference != null) {
String theStylesheetReference = stylesheetReference;
if (theStylesheetReference.startsWith("/")) {
theStylesheetReference = theStylesheetReference.substring(1);
}
if (path.endsWith(theStylesheetReference)) {
context.abortWith(getExistingResource(m, ui, stylesheetReference));
}
}
}
return;
Expand Down

0 comments on commit df2241c

Please sign in to comment.