[
https://issues.apache.org/jira/browse/FELIX-6714?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler resolved FELIX-6714.
-------------------------------------
Resolution: Fixed
Fixed in
https://github.com/apache/felix-dev/commit/7a351beced09320ab306d117e9e54878754c93bf
by reversing the order (first remove then set)
Added test cases
> Special request attributes might not be set with multiple wrappers
> ------------------------------------------------------------------
>
> Key: FELIX-6714
> URL: https://issues.apache.org/jira/browse/FELIX-6714
> Project: Felix
> Issue Type: Bug
> Components: HTTP Service
> Affects Versions: http.wrappers-1.0.4, http.wrappers6-1.1.4,
> http.jetty12-1.0.10, http.jetty-5.1.20
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: http.wrappers6-1.1.6, http.wrappers-1.0.6,
> http.jetty-5.1.22, http.jetty12-1.0.12
>
>
> When multiple layers of the http wrappers are used with custom wrappers in
> between, special request attributes might not be set properly. This includes
> attributes for error handling, include/forward request dispatching.
> For example:
> * the original request is a jakarta.servlet request
> * this is wrapper in a javax.servlet request
> * which is then wrapper by a javax.servlet request wrapper
> * which is then wrapped by jakarta.servlet request wrapper
> If now a special attribute is set on the latest request object, the
> implementation of setAttribute causes it to be set first, but then calls
> removeAttribute - which in turn will wipe out the value
--
This message was sent by Atlassian Jira
(v8.20.10#820010)