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

Karl Pauls commented on SLING-7349:
-----------------------------------

The reason is that we need to look at the post parameters during the 
handleSecurity of the SlingHttpContext. This is fine in case the request then 
goes on to a SlingHttpRequest (as that will reuse the ParameterSupport we used 
during the handleSecurity - however, in case that it is a custom (i.e., plain 
javax.servlet) Servlet that registered with the org.apache.sling HttpContext 
(via say, the whiteboard) it will not get the same ParameterSupport and the 
body has already been parsed. Subsequently, the parameters are lost. 

> Plain Servlets registered with the org.apache.sling HTTP Context cannot get 
> requests parameters from POST body
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-7349
>                 URL: https://issues.apache.org/jira/browse/SLING-7349
>             Project: Sling
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: Engine 2.6.10
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>             Fix For: Engine 2.6.12
>
>
> If a servlet is registered using the `org.apache.sling` context, e.g. using
> {code}
> HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT + "=(" + 
> HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=org.apache.sling)"
> {code}
> and a POST is made to this servlet, any request parameters in the body of the 
> POST return null when retrieved using `request.getParameter()`.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to