[mapserver-commits] r12138 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:00:58 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:00:58 -0700 (Fri, 26 Aug 2011)
New Revision: 12138

Modified:
   trunk/mapserver/mapcache/src/mod_geocache.c
Log:
add image formats and transformations

update issue 4.
initial implementation commited, needs testing and validation
thomas.bonfort | 2010-10-21 17:40:20 +0200 (Thu, 21 Oct 2010)

Modified: trunk/mapserver/mapcache/src/mod_geocache.c
===================================================================
--- trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:00:53 UTC (rev 12137)
+++ trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:00:58 UTC (rev 12138)
@@ -35,17 +35,18 @@
 
 static int geocache_write_tile(request_rec *r, geocache_tile *tile) {
    int rc;
-   if(tile->tileset->source->image_format == GEOCACHE_IMAGE_FORMAT_PNG) 
-      ap_set_content_type(r, "image/png");
-   else
-      ap_set_content_type(r, "image/jpeg");
 
+
    ap_update_mtime(r, tile->mtime);
    if((rc = ap_meets_conditions(r)) != OK) {
       return rc;
    }
    ap_set_last_modified(r);
    ap_set_content_length(r,tile->data->size);
+   if(tile->tileset->source->image_format == GEOCACHE_IMAGE_FORMAT_PNG) 
+      ap_set_content_type(r, "image/png");
+   else
+      ap_set_content_type(r, "image/jpeg");
    ap_rwrite((void*)tile->data->buf, tile->data->size, r);
 
    return OK;



More information about the mapserver-commits mailing list