You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2022/11/15 17:29:23 UTC
[sling-org-apache-sling-tooling-support-install] branch master updated: SLING-11672 followup fix to workaround SLING-11677
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tooling-support-install.git
The following commit(s) were added to refs/heads/master by this push:
new d1e8be2 SLING-11672 followup fix to workaround SLING-11677
d1e8be2 is described below
commit d1e8be2696efe1fb5b1731be8c2ae9fd861b0b02
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Nov 15 18:29:18 2022 +0100
SLING-11672 followup fix to workaround SLING-11677
---
.../org/apache/sling/tooling/support/install/impl/InstallServlet.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
index b45d155..e9f8fff 100644
--- a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
+++ b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallServlet.java
@@ -51,6 +51,8 @@ import org.osgi.framework.Constants;
import org.osgi.framework.wiring.FrameworkWiring;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
+import org.osgi.service.http.whiteboard.HttpWhiteboardConstants;
+import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardContextSelect;
import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardServletMultipart;
import org.osgi.service.http.whiteboard.propertytypes.HttpWhiteboardServletPattern;
import org.slf4j.Logger;
@@ -62,6 +64,8 @@ import org.slf4j.LoggerFactory;
@Component(service = Servlet.class)
@HttpWhiteboardServletPattern("/system/sling/tooling/install")
@HttpWhiteboardServletMultipart(enabled = true, fileSizeThreshold = InstallServlet.UPLOAD_IN_MEMORY_SIZE_THRESHOLD)
+//choose another servlet context with a higher ranking than the Sling one (https://issues.apache.org/jira/browse/SLING-11677)
+@HttpWhiteboardContextSelect("(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=org.osgi.service.http)")
public class InstallServlet extends HttpServlet {
private static final long serialVersionUID = -8820366266126231409L;