[mapserver-commits] r12965 - in trunk: mapserver msautotest/wxs msautotest/wxs/expected

svn at osgeo.org svn at osgeo.org
Wed Jan 4 12:23:05 EST 2012


Author: schpidi
Date: 2012-01-04 09:23:04 -0800 (Wed, 04 Jan 2012)
New Revision: 12965

Added:
   trunk/msautotest/wxs/expected/wms_version_exception_blank.png
   trunk/msautotest/wxs/expected/wms_version_exception_inimage.png
   trunk/msautotest/wxs/expected/wms_version_exception_xml.xml
Modified:
   trunk/mapserver/maperror.c
   trunk/msautotest/wxs/wms_simple.map
Log:
Correcting exception header problem introduced with r12907 and r12912.
Adding tests for EXCEPTIONS parameter.


Modified: trunk/mapserver/maperror.c
===================================================================
--- trunk/mapserver/maperror.c	2012-01-04 16:26:27 UTC (rev 12964)
+++ trunk/mapserver/maperror.c	2012-01-04 17:23:04 UTC (rev 12965)
@@ -492,7 +492,7 @@
 
   /* actually write the image */
   if(!filename) {
-      msIO_setHeader("Content-type","image/gif");
+      msIO_setHeader("Content-type","%s", MS_IMAGE_MIME_TYPE(format));
       msIO_sendHeaders();
   }
   msSaveImage(NULL,img,filename);

Added: trunk/msautotest/wxs/expected/wms_version_exception_blank.png
===================================================================
--- trunk/msautotest/wxs/expected/wms_version_exception_blank.png	                        (rev 0)
+++ trunk/msautotest/wxs/expected/wms_version_exception_blank.png	2012-01-04 17:23:04 UTC (rev 12965)
@@ -0,0 +1,15 @@
+Content-type: image/png
+
+‰PNG
+
+   
+IHDR    ,   ~G   PLTEÿÿÿ§ÄÈ   &IDAThíÁ
+    ÷Om7                þ
+=< 5h    IEND®B`‚Content-type: text/html
+
+<HTML>
+<HEAD><TITLE>MapServer Message</TITLE></HEAD>
+<!-- MapServer version 6.1-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
+<BODY BGCOLOR="#FFFFFF">
+msOWSParseVersionString(): OWS error. Invalid version (1). Version must be in the format &#39;x.y&#39; or &#39;x.y.z&#39;
+</BODY></HTML>
\ No newline at end of file

Added: trunk/msautotest/wxs/expected/wms_version_exception_inimage.png
===================================================================
--- trunk/msautotest/wxs/expected/wms_version_exception_inimage.png	                        (rev 0)
+++ trunk/msautotest/wxs/expected/wms_version_exception_inimage.png	2012-01-04 17:23:04 UTC (rev 12965)
@@ -0,0 +1,15 @@
+Content-type: image/png
+
+‰PNG
+
+   
+IHDR    ,   ~G   PLTEÿÿÿ   UÂÓ~  üIDAThíÙÏkÓ`ðçMßeIé$”md8$‰û‘ Ý`PQá]¥õG©°ƒè%º½¹ËŽo¡'¥”&ˆ6°ƒÂŽË(ÂÊ2/vðàÁ?ÃÄ^dF'sE¿ŸCÞä}ß'ï›äðæIˆ Î÷o·'[‰ù;âdã=뫃^òag\û>uÅá¾.ˆ+{AºÀ°{Dœ¸$'XD3J¯$Õ¿–¸\˜7ìôj+=æe¸ýt-Y±­3
+3®#ñ»Þyþ:¡0Û;Óy  þ'Ì”FPè+2X­µp›pí¾¹\Xll,°OOR®ÜxÁØñœ®X’v"åF«*3õ¯ÕÙ²òm7–ɱ«ëò¯ã"x ­¯:²½/V#Œ÷Ä+‚ê#ä{ç>5      f×%1+H*§ƒ\Ù!5ßk/í‡Y¦ îÞûÖ­ñŸ©³ú*‘)¼}9wï°dw—j+¦~‹Jn—ø›l:ZšþXÔlÒ—jëîXþxÔT‹D#w“ÑÉÊÞ¡è4«»ñ‚cê[¢c»)Þx—¹íÄò9î˜êcu¦ýÒå{Jîä$cñ†Å"ƒÈP‰<¢ð¯CûԐÑtÛn~þÀsq1%Q¿!OÅ—Nñ}“k4Kl{Ó`†½Gâ
+             è³D]õöÛÒ    IEND®B`‚Content-type: text/html
+
+<HTML>
+<HEAD><TITLE>MapServer Message</TITLE></HEAD>
+<!-- MapServer version 6.1-dev OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
+<BODY BGCOLOR="#FFFFFF">
+msOWSParseVersionString(): OWS error. Invalid version (1). Version must be in the format &#39;x.y&#39; or &#39;x.y.z&#39;
+</BODY></HTML>
\ No newline at end of file

Added: trunk/msautotest/wxs/expected/wms_version_exception_xml.xml
===================================================================
--- trunk/msautotest/wxs/expected/wms_version_exception_xml.xml	                        (rev 0)
+++ trunk/msautotest/wxs/expected/wms_version_exception_xml.xml	2012-01-04 17:23:04 UTC (rev 12965)
@@ -0,0 +1,8 @@
+Content-type: text/xml
+
+<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
+<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
+<ServiceException>
+msOWSParseVersionString(): OWS error. Invalid version (1). Version must be in the format &#39;x.y&#39; or &#39;x.y.z&#39;
+</ServiceException>
+</ServiceExceptionReport>

Modified: trunk/msautotest/wxs/wms_simple.map
===================================================================
--- trunk/msautotest/wxs/wms_simple.map	2012-01-04 16:26:27 UTC (rev 12964)
+++ trunk/msautotest/wxs/wms_simple.map	2012-01-04 17:23:04 UTC (rev 12965)
@@ -12,6 +12,9 @@
 #
 # version exception
 # RUN_PARMS: wms_version_exception.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1" > [RESULT]
+# RUN_PARMS: wms_version_exception_xml.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1&EXCEPTIONS=XML" > [RESULT]
+# RUN_PARMS: wms_version_exception_inimage.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1&EXCEPTIONS=INIMAGE" > [RESULT]
+# RUN_PARMS: wms_version_exception_blank.png [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1&EXCEPTIONS=BLANK" > [RESULT]
 #
 # Capabilities updatesequence (less than)
 # RUN_PARMS: wms_caps_updatesequence.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities&updatesequence=15" > [RESULT_DEVERSION]



More information about the mapserver-commits mailing list