[mapserver-commits] r7461 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Mar 18 18:24:13 EDT 2008
Author: tomkralidis
Date: 2008-03-18 18:24:13 -0400 (Tue, 18 Mar 2008)
New Revision: 7461
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwms.c
Log:
add support for HTTP Cache-Control max-age (#2551)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-03-18 20:01:19 UTC (rev 7460)
+++ trunk/mapserver/HISTORY.TXT 2008-03-18 22:24:13 UTC (rev 7461)
@@ -13,6 +13,8 @@
Current Version (5.1-dev, SVN trunk):
-------------------------------------
+- mapwms.c: add Cache-Control max-age HTTP header support (#2551)
+
- mapogcsos.c: support URI encoded procedures correctly (#2547)
- Added support for EMPTY template with WMS GetFeatureInfo (#546)
Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c 2008-03-18 20:01:19 UTC (rev 7460)
+++ trunk/mapserver/mapwms.c 2008-03-18 22:24:13 UTC (rev 7461)
@@ -2196,8 +2196,14 @@
img = msDrawMap(map, MS_FALSE);
if (img == NULL)
return msWMSException(map, nVersion, NULL);
-
+ /* Set the HTTP Cache-control headers if they are defined
+ in the map object */
+ const char *http_max_age;
+ if( (http_max_age = msOWSLookupMetadata(&(map->web.metadata), "MO", "http_max_age")) ) {
+ msIO_printf("Cache-Control: max-age=%s\n", http_max_age , 10, 10);
+ }
+
msIO_printf("Content-type: %s%c%c",
MS_IMAGE_MIME_TYPE(map->outputformat), 10,10);
if (msSaveImage(map, img, NULL) != MS_SUCCESS)
More information about the mapserver-commits
mailing list