You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2018/03/19 10:15:00 UTC

[jira] [Closed] (SLING-7525) Content-Type missing after applying the ContentDispositionFilter twice

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

Antonio Sanso closed SLING-7525.
--------------------------------

> Content-Type missing after applying the ContentDispositionFilter twice
> ----------------------------------------------------------------------
>
>                 Key: SLING-7525
>                 URL: https://issues.apache.org/jira/browse/SLING-7525
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Security 1.1.8, Security 1.1.10
>            Reporter: Orlowska
>            Assignee: Antonio Sanso
>            Priority: Major
>             Fix For: Security 1.1.12
>
>
> The issue started with the SLING-7219.
> When the {{ContentDispositionFilter}} is called twice (as a request filter and as a forward filter) on a single request then the {{Content-Type}} is not propagated and missing in the Response.
>  
> On the second pass in the {{setContentType()}} the condition [1]
> {code:java}
> if (previousContentType != null && previousContentType.equals(type)){code}
> will be fulfilled so the [2]
> {code:java}
> super.setContentType(type);{code}
> will not be called.
>  
> [1] [https://github.com/apache/sling-org-apache-sling-security/blob/master/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java#L208]
> [2] [https://github.com/apache/sling-org-apache-sling-security/blob/master/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java#L253]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)