[
https://issues.apache.org/jira/browse/SLING-7445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16339473#comment-16339473
]
Konrad Windszus commented on SLING-7445:
----------------------------------------
I think requesting via a HEAD towards the node is the only available way to
figure out from the outside whether a node exists already. The only thing we
could do here is treat 200 and 403 in the same way
(https://github.com/apache/sling-maven-sling-plugin/blob/249bc5359d636f9412989691d4528fdc72e65381/src/main/java/org/apache/sling/maven/bundlesupport/deploy/method/WebDavPutDeployMethod.java#L133),
i.e. we assume that the node exists already.
[~Henry Kuijpers] WDYT?
> Install bundle: "Failed getting intermediate path at
> http://localhost:4502/apps/project. Reason: Forbidden" when directory
> listings are turned off
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-7445
> URL: https://issues.apache.org/jira/browse/SLING-7445
> Project: Sling
> Issue Type: Bug
> Components: Maven Plugins and Archetypes, Tooling
> Affects Versions: Maven Sling Plugin 2.1.8, Maven Sling Plugin 2.3.4
> Reporter: Henry Kuijpers
> Priority: Major
>
> The maven-sling-plugin tries to deploy a bundle to a Sling system. In case it
> deploys to a path that doesn't exist yet, it tries to create the intermediary
> paths.
> In case of WebDAV deployment, it tries to figure out which paths exist and
> which paths don't exist, to determine what work it needs to do to ensure all
> intermediary paths.
> When determining which path is the first one to not exist, it relies on the
> status code 404 to indicate this.
> However, when the "index"-property of
> org.apache.sling.servlets.get.DefaultGetServlet is set to false (default
> setting on Adobe AEM), the server will send a 403 Forbidden instead of a 404
> Not Found. This causes the install-command to fail with the exception
> mentioned in the title.
> *It would be nice if there is a fallback in case the index-property of
> DefaultGetServlet is turned off.*
> [http://localhost:4502/apps/project/install/] gives 404 (correct, so it
> should try the parent)
> [http://localhost:4502/apps/project/] gives 403 (problem, it expected 200,
> because it exists)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)