You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by pa...@apache.org on 2021/11/21 23:48:51 UTC

[sling-org-apache-sling-servlets-resolver] branch issues/SLING-10934 created (now dbb0c97)

This is an automated email from the ASF dual-hosted git repository.

pauls pushed a change to branch issues/SLING-10934
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git.


      at dbb0c97  SLING-10934: don't add .servlet extension to resource type registrations with a method that provide a path already

This branch includes the following new commits:

     new dbb0c97  SLING-10934: don't add .servlet extension to resource type registrations with a method that provide a path already

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-servlets-resolver] 01/01: SLING-10934: don't add .servlet extension to resource type registrations with a method that provide a path already

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pauls pushed a commit to branch issues/SLING-10934
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-resolver.git

commit dbb0c974077fc4d93e1d09f28d3d5468cdde8ad0
Author: Karl Pauls <ka...@gmail.com>
AuthorDate: Mon Nov 22 00:48:41 2021 +0100

    SLING-10934: don't add .servlet extension to resource type registrations with a method that provide a path already
---
 .../resolver/internal/resource/ServletResourceProviderFactory.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProviderFactory.java b/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProviderFactory.java
index 169066f..203bc8c 100644
--- a/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProviderFactory.java
+++ b/src/main/java/org/apache/sling/servlets/resolver/internal/resource/ServletResourceProviderFactory.java
@@ -324,7 +324,7 @@ public class ServletResourceProviderFactory {
                             pathAdded = true;
                         }
                     }
-                } else if (methods != null) {
+                } else if (methods != null && !hasPathRegistration) {
                     // only methods declared
                     for (String method : methods) {
                         pathSet.add(selPath + method + SERVLET_PATH_EXTENSION);