[
http://jira.magnolia.info/browse/MAGNOLIA-2387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18166#action_18166
]
Gregory Joseph commented on MAGNOLIA-2387:
------------------------------------------
Fabrizio,
Two more things:
* I'm not at all against the patch, but am i just a little wary of past issues
we've had with forwards and includes etc, especially with Weblogic or
Websphere behaving their own way (see the encoding issue we're having _again_
with WL...)
* I'm surprised you're saying virtualUri with forwards and parameters don't
work anymore, since we have one of the default ones doing just that ("messages"
in the adminCentral module)
> Request stored in WebContext is not updated after a forward
> -----------------------------------------------------------
>
> Key: MAGNOLIA-2387
> URL: http://jira.magnolia.info/browse/MAGNOLIA-2387
> Project: Magnolia
> Issue Type: Bug
> Components: core
> Affects Versions: 3.6.1
> Reporter: Fabrizio Giustina
> Assignee: Fabrizio Giustina
> Fix For: 3.6.2
>
>
> The request stored in WebContext by the ContextFilter is never updated, and
> may miss parameters added by a forward.
> For example, using a virtualUri filter in order to forward from
> /test/param.html to test..html?x=param I get different results when I do:
> request.getParam("x") --> "param"
> ((WebContext) MgnlContext.getInstance()).getRequest().getParam("x") --> null
> this also means that paragraphs never see parameters added by a forward,
> since the paragraph renderer gets the request from the context. Looks like a
> regression from 3.5, since I was using this kind of forwards and they stopped
> working after upgrading to 3.6 (not sure about which change in the filters
> has caused this).
> I would propose to fix it by updating the request stored in WebContext any
> time ContextFilter processes the request. A good fix, without modifying in
> any way the WebContext interface, is doing something like the following:
> {noformat}
> if (!MgnlContext.hasInstance() || MgnlContext.isSystemInstance())
> {
> MgnlContext.initAsWebContext(request, response, servletContext);
> contextSet = true;
> }
> + else
> + {
> + // update request
> + WebContext webContext = (WebContext) MgnlContext.getInstance();
> + webContext.init(request, response, servletContext);
> + }
> +
> {noformat}
> I would like to commit this to 3.6.2, this can be a very annoying bug for
> anyone using forwards with parameters. Any objection?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------