I think I fixed the issue in Sling Engine. At least the starter tests
now pass with latest Engine SNAPSHOT and latest Apache Felix Http Jetty
release.
Regards
Carsten
On 12.05.2023 12:13, Robert Munteanu wrote:
Thanks for the context, Carsten.
I've filed https://issues.apache.org/jira/browse/SLING-11872 so that
the information is located in a single place, whenever someone has the
time to look into it.
I was hoping this would be more of a quick fix, but it looks like it
needs a bit more attention.
Thanks,
Robert
On Fri, 2023-05-12 at 10:49 +0200, Carsten Ziegeler wrote:
I think the solution here is to do the same in Sling Engine as Apache
Felix is doing: instead of setting the attributes on the request,
overwriting the getAttribute method. This avoids leakage of
information
as well.
Regards
Carsten
On 04.05.2023 12:45, Carsten Ziegeler wrote:
My best guess is that it is due to this new code in 4.2.0:
https://github.com/apache/felix-dev/blob/http-4.x/http/base/src/main/java/org/apache/felix/http/base/internal/dispatch/ServletRequestWrapper.java#L166
Regards
Carsten
On 04.05.2023 10:46, Carsten Ziegeler wrote:
I don't really have a very helpful reply. I'm not aware of
changes in
this area. As far as I remember, the attributes are set by the
http
base implementation. I'm also not sure what the IncludeTest is
actually testing; is it testing a Sling include or a servlet
include?
Http base has tests for the includes andh whether the attribute
is set.
I fear the only way to figure out what is going on is debugging
the
test run and see what happens (or not happens).
Regards
Carsten
On 04.05.2023 09:50, Robert Munteanu wrote:
Hi,
I am looking at a renovate PR [1] that updates
org.apache.felix:org.apache.felix.http.jetty from 4.1.14 to
4.2.10 and
org.apache.felix:org.apache.felix.http.servlet-api from 1.1.4
to 1.2.0
.
There are 3 failures in the IncludeIT that show that the
javax.servlet.include.request_uri attribute is no longer
present:
[ERROR] Failures:
[ERROR]
IncludeTest.testForcedResourceType:149-
assertIncludeRequestAttributes:154-
assertIncludeRequestAttributes:167->assertRequestAttribute:189
Expected content contains '--javax.servlet.include.request_uri-
'
[ERROR]
IncludeTest.testWithInclude:114-
assertIncludeRequestAttributes:154-
assertIncludeRequestAttributes:167->assertRequestAttribute:189
Expected content contains '--javax.servlet.include.request_uri-
'
[ERROR]
IncludeTest.testWithIncludeAndExtension:123-
assertIncludeRequestAttributes:154-
assertIncludeRequestAttributes:167->assertRequestAttribute:189
Expected content contains '--javax.servlet.include.request_uri-
'
The test failures happen with version 4.2.0 as well, so this
has
something to do with the minor version bump. Looking at the
Felix
changelog [2] this could be related to supporting the Servlet
API 4.0
[3], but I didn't manage to figure out what is going on.
If anyone has an idea about how to make this progress, please
share,
I'm out of ideas at the moment.
Thanks,
Robert
[1]:
https://github.com/apache/sling-org-apache-sling-starter/pull/142
[2]:
https://issues.apache.org/jira/projects/FELIX/versions/12351176
[3]: https://issues.apache.org/jira/browse/FELIX-6498
--
Carsten Ziegeler
Adobe
[email protected]