dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16849
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6525: Added public to cache-control header, necessary when authorization header is present in request
------------------------------------------------------------
revno: 6525
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2012-04-08 20:10:08 +0200
message:
Added public to cache-control header, necessary when authorization header is present in request
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/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-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-03-28 16:04:53 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-04-08 18:10:08 +0000
@@ -103,7 +103,7 @@
}
else if ( cacheStrategy.equals( CacheStrategy.CACHE_6AM_TOMORROW ) )
{
- response.setHeader( HEADER_CACHE_CONTROL, "max-age=" + DateUtils.getSecondsUntilTomorrow( 6 ) );
+ response.setHeader( HEADER_CACHE_CONTROL, "public, max-age=" + DateUtils.getSecondsUntilTomorrow( 6 ) );
response.setHeader( HEADER_EXPIRES, DateUtils.getHttpDateString( DateUtils.getDateForTomorrow( 6 ) ) );
}
else if ( cacheStrategy.equals( CacheStrategy.CACHE_TWO_WEEKS ) )
@@ -111,7 +111,7 @@
Calendar cal = Calendar.getInstance();
cal.add( Calendar.DAY_OF_YEAR, 14 );
- response.setHeader( HEADER_CACHE_CONTROL, "max-age=1209600" );
+ response.setHeader( HEADER_CACHE_CONTROL, "public, max-age=1209600" );
response.setHeader( HEADER_EXPIRES, DateUtils.getHttpDateString( cal.getTime() ) );
}