sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject [sling-org-apache-sling-security] branch master updated: SLING-7525 - Content-Type missing after applying the ContentDispositionFilter twice
Date Wed, 14 Mar 2018 08:08:01 GMT
This is an automated email from the ASF dual-hosted git repository.

asanso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-security.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e37dda  SLING-7525 - Content-Type missing after applying the ContentDispositionFilter
twice
8e37dda is described below

commit 8e37dda15ce277cc9f63c87862d55bd0595cf5df
Author: Antonio Sanso <asanso@adobe.com>
AuthorDate: Tue Mar 13 15:01:43 2018 +0100

    SLING-7525 - Content-Type missing after applying the
    ContentDispositionFilter twice
---
 .../java/org/apache/sling/security/impl/ContentDispositionFilter.java   | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java b/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java
index 8d53b7c..474344a 100644
--- a/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java
+++ b/src/main/java/org/apache/sling/security/impl/ContentDispositionFilter.java
@@ -206,8 +206,10 @@ public class ContentDispositionFilter implements Filter {
                 String previousContentType = (String) request.getAttribute(ATTRIBUTE_NAME);
 
                 if (previousContentType != null && previousContentType.equals(type))
{
+                    super.setContentType(type);
                     return;
                 }
+                
                 request.setAttribute(ATTRIBUTE_NAME, type);
 
                 String resourcePath = resource.getPath();

-- 
To stop receiving notification emails like this one, please contact
asanso@apache.org.

Mime
View raw message