[MAGNOLIA-3338] Context is not updated on include request Created: 26/Oct/10 Updated: 01/Jul/11 Resolved: 01/Dec/10 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | core, templating |
| Affects Version/s: | 4.3.7 |
| Fix Version/s: | 4.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Tobias Mattsson | Assignee: | Tobias Mattsson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | filter, include, servlet, tomcat, weblogic, websphere | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||||||||||||||
| Description |
|
The magnolia filter chain is not executed on includes, therefor any wrappers that appear at the front of the request wrapper chain is not set using WebContext.push(). This means that when processing an include to a JSP that does an include of its own, using the request on the top of the request stack in WebContext, the include happens on the wrong wrapper. A suitable test case for this would be a module with pages that return the word ERROR if they detect that the request wrapper stack in WebContext is not in sync. An integration test suite could then access these pages and test for the word ERROR. This needs to be tested in all supported servlet containers / application servers. See http://wiki.magnolia-cms.com/display/DEV/How+servlet+request+wrapping+works for more details. |
| Comments |
| Comment by Tobias Mattsson [ 02/Nov/10 ] |
|
The problem also appears on forwards, when the DONT_DISPATCH_ON_FORWARD_ATTRIBUTE is set, since then the request does not pass through the context filter but might later do WebContext.include() at which point the include is done on the wrong request object. |