[MAGNOLIA-2472] GZip Filter throws IllegalStateException when performing a redirect Created: 10/Nov/08 Updated: 23/Jan/13 Resolved: 05/Dec/08 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | cache |
| Affects Version/s: | 3.6.3 |
| Fix Version/s: | 4.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jackson Nicolas | Assignee: | Jan Haderka |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
WinXP, JDK 1.5 |
||
| 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
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
I have a paragraph using Freemarker and an action paragraph class. Please note: The redirect works fine when I disable the GZip Filter. My Code: WebContext ctx = null; if(ctx != null) { if (!response.isCommitted()) { response.reset(); response.sendRedirect(MgnlContext.getContextPath() + ContentUtil.getContentByUUID(ContentRepository.WEBSITE, redirectPage).getHandle() + "." + ServerConfiguration.getInstance().getDefaultExtension()); }} catch (IOException ioe) { //TODO: handling }} The error: java.lang.IllegalStateException: Failure when attempting to set |
| Comments |
| Comment by Jan Haderka [ 10/Nov/08 ] |
|
Was just about to reply to you on the list. This issue is related to problem described at |
| Comment by Philipp Bracher [ 14/Nov/08 ] |
|
Note: you should not execute redirects in paragraphs. Once you reach the paragraph (the action is executed) the main template has already written its content. |
| Comment by Jan Haderka [ 05/Dec/08 ] |
|
The problem was caused by discrepancy between real response and one available via WebContext. For details see |
| Comment by Magnolia International [ 05/Dec/08 ] |
|
Can't this be backported to the 3.6 branch ? |
| Comment by Jan Haderka [ 05/Dec/08 ] |
|
It would need backporting all the changes done for
It can be done if necessary, but I would rather not. On top of all that, the use case presented here is IMHO invalid. You should not redirect from within paragraphs. If you redirect from Filter or from page template you should not be seeing this issue even on 3.6 |
| Comment by Magnolia International [ 05/Dec/08 ] |
|
ok |
| Comment by Philipp Bracher [ 08/Dec/08 ] |
|
Definitely no back-port. |