[ 
https://issues.apache.org/jira/browse/SLING-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12602594#action_12602594
 ] 

Felix Meschberger commented on SLING-512:
-----------------------------------------

The cause of this issue is the servlet registration process introduced with 
SLING-430: If a servlet is registered without the sling.servlet.methods 
property, a default value of [ "GET", "HEAD" ] is assumed. This default setting 
together with the setting of sling.servlet.extensions=aptml of the AptServlet 
results in the AptServlet to be registered three times:

   * to handle GET requests
   * to handle HEAD requests
   * to handel GET/HEAD requests with an extension of .aptml

The first two registrations are not needed and in fact cause the servlet 
resolution to be confused as these registrations hide (overwrite, replace) the 
registration of the default GET servlet.

The fix to this issue is to only consider a default value for the 
sling.servlet.methods property if the sling.servlet.extensions property is not 
set.

> APT servlet takes over requests that do not have the aptml extension
> --------------------------------------------------------------------
>
>                 Key: SLING-512
>                 URL: https://issues.apache.org/jira/browse/SLING-512
>             Project: Sling
>          Issue Type: Bug
>          Components: Servlets Resolver
>    Affects Versions: 2.0.0
>            Reporter: Bertrand Delacretaz
>            Assignee: Felix Meschberger
>             Fix For: 2.0.1
>
>
> I downloaded 
> http://people.apache.org/~cziegeler/releases/sling/maven/org.apache.sling.launchpad.app-2.0.0-incubator.jar
>  and started it with java -jar ...
> Going to http://localhost:8080/index.html shows the page with no css and no 
> logo, and http://localhost:8080/sling-logo.png gives an "Exception while 
> parsing APT content" error.
> After stopping the APT servlet bundle, everything's back to normal.
> Same problem in the trunk.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to