[
https://issues.apache.org/jira/browse/SLING-7174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16188425#comment-16188425
]
Justin Edelson commented on SLING-7174:
---------------------------------------
bq. In my opinion Sling should provide a Request / Response class for in-Sling
rendering that is for that specific purpose as using that class for testing
does clash with the the rendering.
It does. That's the purpose of the Servlet Helpers bundle.
> Using MockSlingHttpServletRequest for In-Sling Rendering fails when used with
> Export Servlet
> --------------------------------------------------------------------------------------------
>
> Key: SLING-7174
> URL: https://issues.apache.org/jira/browse/SLING-7174
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Environment: Sling 9, Java 1.8
> Reporter: Andreas Schaefer
>
> When I use MockSlingHttpServletRequest with SlingRequestProcessor to render a
> page within sling then I will get an Unsupported Operation Exception when I
> hit the Export Servlet.
> The reason is that the Export Servlet is retrieving Request Reader in
> addScriptBindings():
> bindings.put(READER, request.getReader());
> In my opinion Sling should provide a Request / Response class for in-Sling
> rendering that is for that specific purpose as using that class for testing
> does clash with the the rendering.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)