You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2019/11/27 14:42:09 UTC
[Bug 63968] New: ExpiresFilter: invalid cast
https://bz.apache.org/bugzilla/show_bug.cgi?id=63968
Bug ID: 63968
Summary: ExpiresFilter: invalid cast
Product: Tomcat 8
Version: 8.5.49
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: cpils@timocom.com
Target Milestone: ----
The getExpirationDate() Method of the ExpiresFilter throws a ClassCastException
when the following conditions hold:
1. the request is ServletRequestWrapper
2. an inner request implements the interface
org.apache.catalina.servlet4preview.http.HttpServletRequest
Then the method will throw a ClassCastException in line 1296 of
org.apache.catalina.filters.ExpiresFilter.
Log Message observed:
Our application uses a custom implementation of a ServletRequestWrapper. The
ClassCastException logs that our custom implementation cannot be cast to
org.apache.catalina.servlet4preview.http.HttpServletRequest
Root Cause
==========
The root cause is that if-conditon in line 1295 checks that innerRequest is an
instance of servlet4preview.http.HttpServletRequest, yet in line 1296 the
request (rather than the innerRequest) is casted.
Out Tomcat Settings:
====================
We use Tomcat 8.5.49 with Connector-Protocol
org.apache.coyote.http11.Http11NioProtocol.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 63968] ExpiresFilter: invalid cast
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63968
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
Thanks for the report.
Fixed in:
- 8.5.x for 8.5.50 onwards
Only 8.5.x was affected.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org