← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20533: made ExcludableShalloeEtagHeaderFilter configurable with an init param in web.xml. Configured all...

 

------------------------------------------------------------
revno: 20533
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-10-06 17:57:15 +0200
message:
  made ExcludableShalloeEtagHeaderFilter configurable with an init param in web.xml. Configured all web modules to exclude api endpoints 'dataValues', 'dataValueSets', 'dataValues/files' and 'fileResources'
modified:
  dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-api/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/ExcludableShallowEtagHeaderFilter.java
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml
  dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-api-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -30,7 +30,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-api/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -16,7 +16,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>encoding-filter</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/ExcludableShallowEtagHeaderFilter.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/ExcludableShallowEtagHeaderFilter.java	2015-10-06 14:48:17 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/servlet/filter/ExcludableShallowEtagHeaderFilter.java	2015-10-06 15:57:15 +0000
@@ -32,39 +32,70 @@
 import java.util.regex.Pattern;
 
 import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.filter.ShallowEtagHeaderFilter;
 
 /**
- * Subclass of Spring ShallowEtagHeaderFilter which ignores specific URL patterns.
+ * Subclass of {@link org.springframework.web.filter.ShallowEtagHeaderFilter} which allows exclusion of URIs matching a regex.
+ *
+ * The regex is given as the init-param named 'excludeUriRegex' in the filter configuration.
+ *
+ * Example configuration:
+ *  {@code
+ *  <filter>
+ *      <filter-name>ShallowEtagHeaderFilter</filter-name>
+ *      <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+ *      <init-param>
+ *          <param-name>excludeUriRegex</param-name>
+ *          <param-value>/api/dataValues|/api/dataValues/files</param-value>
+ *      </init-param>
+ *  </filter>
+ *  }
+ *
+ *  The example exactly matches and excludes any request to the '/api/dataValues' and '/api/dataValues/files' from the filter.
  * 
  * @author Lars Helge Overland
+ * @author Halvdan Hoem Grelland
  */
 public class ExcludableShallowEtagHeaderFilter
     extends ShallowEtagHeaderFilter
 {
-    private static final String EXCLUDE_REGEX = "/api/dataValueSets|/api/dataValues|/api/fileResources";
-    
+    private static final String EXCLUDE_URI_REGEX_NAME = "excludeUriRegex";
+
+    private Pattern pattern = null;
+
+    @Override
+    protected void initFilterBean()
+        throws ServletException
+    {
+        FilterConfig filterConfig = getFilterConfig();
+
+        String excludeRegex = filterConfig != null ? filterConfig.getInitParameter( EXCLUDE_URI_REGEX_NAME ) : "";
+
+        if ( StringUtils.isNotBlank( excludeRegex ) )
+        {
+            pattern = Pattern.compile( excludeRegex );
+        }
+    }
+
     @Override
     protected void doFilterInternal( HttpServletRequest request, HttpServletResponse response, FilterChain filterChain )
         throws ServletException, IOException
     {
         String uri = request.getRequestURI();
-        
-        if ( Pattern.matches( EXCLUDE_REGEX, uri ) )
+
+        if ( pattern != null && pattern.matcher( uri ).matches() )
         {
-            // Proceed without invoking this filter
-            
-            filterChain.doFilter( request, response ); 
+            filterChain.doFilter( request, response ); // Proceed without invoking this filter
         }
         else
         {
-            // Do invoke this filter
-            
-            super.doFilterInternal( request, response, filterChain );
+            super.doFilterInternal( request, response, filterChain ); // Invoke this filter
         }
     }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-appmanager/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-user/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -24,7 +24,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-ohie/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -20,7 +20,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>hiddenHttpMethodFilter</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-portal/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -26,7 +26,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>hiddenHttpMethodFilter</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>

=== modified file 'dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml'
--- dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml	2015-10-06 12:20:26 +0000
+++ dhis-2/dhis-web/dhis-web-validationrule/src/main/webapp/WEB-INF/web.xml	2015-10-06 15:57:15 +0000
@@ -28,7 +28,11 @@
   </filter>
   <filter>
     <filter-name>shallowEtagHeaderFilter</filter-name>
-    <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
+    <filter-class>org.hisp.dhis.servlet.filter.ExcludableShallowEtagHeaderFilter</filter-class>
+    <init-param>
+      <param-name>excludeUriRegex</param-name>
+      <param-value>/api/dataValueSets|/api/dataValues|/api/dataValues/files|/api/fileResources</param-value>
+    </init-param>
   </filter>
   <filter>
     <filter-name>springSecurityFilterChain</filter-name>