[
http://jira.magnolia-cms.com/browse/MAGNOLIA-3014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=27668#action_27668
]
Grégory Joseph commented on MAGNOLIA-3014:
------------------------------------------
Couldn't this be solved by using
{{info.magnolia.module.cache.filter.CacheResponseWrapper}} (or similar) ?
It's currently only used when caching content
({{info.magnolia.module.cache.executor.Store}}) and by the GZipFilter.
Which you actually only run into this sort of issue when you're not caching
(which is the case in the in the linked support issue, see
{{executor.Bypass.processCacheReques}} in the stacktrace), which is an ugly
side-effect.
> call to response.getOutputStream() during the rendering process fails
> ---------------------------------------------------------------------
>
> Key: MAGNOLIA-3014
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3014
> Project: Magnolia
> Issue Type: Bug
> Affects Versions: 4.2
> Reporter: Philipp Bärfuss
> Assignee: Boris Kraft
> Fix For: 4.3.x
>
>
> After the refactoring of the renderers in 4.0 we pass now the writer directly
> to the renderer. Which is done by calling response.getWriter(). This is very
> useful as this makes the rendering in general independent of the servlet API
> and allows direct calls to the rendering engine by Java code (for instance
> servlets or tests).
> Unfortunately a later call to response.getOutputStream() will fail as this
> violates the Servlet API specifications. There are several solutions possible.
> Workaround: registering your custom servlet (at the servlets filter) and let
> the request be rendered by the servlet and not by the rendering filter
> A) Pass a lazy wrapper instead of the writer
> instead of passing the writer we pass a lazy wrapper which will call
> response.getWriter() only once the first operation is performed on the writer
> - not very transparent
> + no changes in the API needed
> B) Change the API
> Support both variations of renderers. This can be achieved by various ways
> B.1) pass a object (magnolia response?) providing both methods which delegate
> to the response
> B.2) have two methods render(.., writer) and render(.. stream) (most likely
> by having two interfaces)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------