← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6146: Using setHeader instead of addHeader in contextUtils

 

------------------------------------------------------------
revno: 6146
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-03-01 17:25:18 +0100
message:
  Using setHeader instead of addHeader in contextUtils
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java


--
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-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java	2012-02-28 17:36:14 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java	2012-03-01 16:25:18 +0000
@@ -125,15 +125,15 @@
 
         if ( disallowCache )
         {
-            response.addHeader( "Cache-Control", "no-cache" );
-            response.addHeader( "Expires", DateUtils.getExpiredHttpDateString() );
+            response.setHeader( "Cache-Control", "no-cache" );
+            response.setHeader( "Expires", DateUtils.getExpiredHttpDateString() );
         }
 
         if ( filename != null )
         {
             String type = attachment ? "attachment" : "inline";
 
-            response.addHeader( "Content-Disposition", type + "; filename=\"" + filename + "\"" );
+            response.setHeader( "Content-Disposition", type + "; filename=\"" + filename + "\"" );
         }
     }