You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Radu Cotescu (Jira)" <ji...@apache.org> on 2020/10/23 19:47:00 UTC

[jira] [Closed] (SLING-9834) [Sling Models] Caching bug with reused Servlet requests

     [ https://issues.apache.org/jira/browse/SLING-9834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Radu Cotescu closed SLING-9834.
-------------------------------

> [Sling Models] Caching bug with reused Servlet requests
> -------------------------------------------------------
>
>                 Key: SLING-9834
>                 URL: https://issues.apache.org/jira/browse/SLING-9834
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Sling Models Impl 1.4.14
>            Reporter: Christophe Jelger
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: Models Implementation 1.4.16
>
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> The fix from https://issues.apache.org/jira/browse/SLING-9781 introduces another unexpected issue because a container like Jetty may reuse ServletRequest objects, so this means that Sling models might be cached across different HTTP requests because of the unwrapping introduced by SLING-9781.
> After a quick discussion with [~cziegeler] and [~justin], it is actually best to use the ServletRequest attributes to store the cached models and avoid any unwrapping.
> I'll provide a PR with a fix.
> cc: [~radu]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)