[MGNLCACHE-154] Requests initiated with ERROR dispatcher do not work with CacheFilter Created: 21/Nov/16 Updated: 16/Feb/17 Resolved: 01/Dec/16 |
|
| Status: | Closed |
| Project: | Cache Modules |
| Component/s: | cache core |
| Affects Version/s: | 5.5 |
| Fix Version/s: | 5.5.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Tommi Salonen | Assignee: | Roman Kovařík |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 50m | ||
| 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
|
||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||
| Sprint: | Kromeriz 73 | ||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||
| Description |
|
Before 5.5, CacheFilter was not executed for requests initiated with the ERROR dispatcher, because CacheFilter extended OncePerRequestAbstractMgnlFilter. In 5.5, CacheFilter does not extend OncePerRequestAbstractMgnlFilter anymore which causes the CacheFilter to be executed twice for example when requesting page that does not exist. Both executions share the same cache key so in the second request (initiated with the ERROR dispatcher) an empty response is returned. This leads to error-pages (defined in web.xml) not working. If CacheFilter is disabled or error-pages excluded from caching by other means, then they are working as expected. |
| Comments |
| Comment by Roman Kovařík [ 23/Nov/16 ] |
|
Hello ttsalonen Regards |
| Comment by Tommi Salonen [ 24/Nov/16 ] |
|
In web.xml: <error-page> /error-404 page is a normal page within the site structure. There are no related virtualURIMappings. |
| Comment by Roman Kovařík [ 24/Nov/16 ] |
|
I was able to reproduce the issue and investigate:
Solution:
Workaround:
|