sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Edelson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7174) Using MockSlingHttpServletRequest for In-Sling Rendering fails when used with Export Servlet
Date Mon, 02 Oct 2017 17:34:00 GMT

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

Justin Edelson commented on SLING-7174:
---------------------------------------

bq. If that Request / Response pair if for In-Sling rendering why is it then prefixed with
'Mock'

Because naming things is hard.

bq. why does it throw an Unsupported Operation Exception?

Presumably because no one thought that was an issue.

> 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
>            Assignee: Justin Edelson
>
> 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)

Mime
View raw message