[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 þ
+=< 5h 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 'x.y' or 'x.y.z'
+</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µppí¾¹\Xll,°OOR®ÜxÁØñ®Xv"åF«*3õ¯ÕÙ²òm7ɱ«ëò¯ã"x ¯:²½/V#÷Ä+ê#ä{ç>5 f×%1+H*§\Ù!5ßk/íY¦ îÞûÖñ©³ú*)¼}9wï°dwj+¦~Jnøl:ZþXÔlÒjëîXþxÔTD#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 'x.y' or 'x.y.z'
+</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 'x.y' or 'x.y.z'
+</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