[MAGNOLIA-3920] GZipFilter swallows original response code Created: 16/Dec/11  Updated: 28/Dec/11  Resolved: 28/Dec/11

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.6

Type: Bug Priority: Neutral
Reporter: Zdenek Skodik Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
relation
is related to MAGNOLIA-3928 When file is missing tomcat return no... Closed
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   

When you set an error-page up in your web.xml and request something non-existing, let say, from DMS then the proper 404 code set by DMSDownloadServlet, if the requested document can't be found in repository, gets overrided by GZipFilter (thanks to CacheResponseWrapper) to 200 since we actually stream the error page now, that is being compressed.



 Comments   
Comment by Milan Divilek [ 28/Dec/11 ]

I resolved it for 4.4.6 by manually setup 404 status, when you render custom 404. There is no testcase because, i'm not sure how and if it's possible to simulate custom 404 from web.xml in testcase.
In 4.5 there is different behaviour for this problem. When you request non-existing documents or images, you don't get any response from tomcat and you get error about not existing file. Opened new issue for this. MAGNOLIA-3928

Generated at Mon Feb 12 03:50:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.