You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2008/01/14 11:03:34 UTC
[jira] Commented: (SLING-152) POST parameters are read from request
body even when contentType is application/x-www-form-urlencoded
[ https://issues.apache.org/jira/browse/SLING-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558557#action_12558557 ]
Felix Meschberger commented on SLING-152:
-----------------------------------------
In fact not only are these x-www-form-urlencoded parameters parsed by Sling, also the request line parameters are parsed by Sling.
Probably it would be better, if Sling would only parse the multipart/form-data requests and take other parameters from the servlet container.
FYI: Sling parses request line and x-www-form-urlencoded parameters to implement the parameter encoding scheme using the Form-Encoding parameter. We can of course workaround this, by assuming the servlet container parses the parameters in ISO-8859-1 encoding and we can just recode this on request.
> POST parameters are read from request body even when contentType is application/x-www-form-urlencoded
> -----------------------------------------------------------------------------------------------------
>
> Key: SLING-152
> URL: https://issues.apache.org/jira/browse/SLING-152
> Project: Sling
> Issue Type: Bug
> Components: Core
> Reporter: Dominique Pfister
>
> In a POST request with content type application/x-www-form-urlencoded, Sling's internal ParameterSupport class (in sling-core) builds a parameter map by parsing the request body available via ServletRequest.getInputStream(). However, if some other component (e.g. a servlet filter) has already looked at some parameter, ServletRequest.getInputStream() will return an empty stream, compliant with Servlet API Specification 2.4 SRV.4.1.1.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.