[mapserver-commits] r7352 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Feb 6 12:13:33 EST 2008
Author: tomkralidis
Date: 2008-02-06 12:13:33 -0500 (Wed, 06 Feb 2008)
New Revision: 7352
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwms.c
Log:
test version after service=WMS (#2475)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-02-06 17:13:10 UTC (rev 7351)
+++ trunk/mapserver/HISTORY.TXT 2008-02-06 17:13:33 UTC (rev 7352)
@@ -13,6 +13,8 @@
Current Version (5.1-dev, SVN trunk):
-------------------------------------
+- mapwms.c: test VERSION after service=WMS (#2475)
+
- OWS: output Capabilities XML updateSequence if set (#2384)
- mapwcs.c: better handling of REQUEST parameter (#2490)
Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c 2008-02-06 17:13:10 UTC (rev 7351)
+++ trunk/mapserver/mapwms.c 2008-02-06 17:13:33 UTC (rev 7352)
@@ -2894,7 +2894,7 @@
{
#ifdef USE_WMS_SVR
int i, status, nVersion=-1;
- const char *request=NULL, *service=NULL, *format=NULL;
+ const char *version=NULL, *request=NULL, *service=NULL, *format=NULL;
/*
** Process Params common to all requests
@@ -2902,11 +2902,7 @@
/* VERSION (WMTVER in 1.0.0) and REQUEST must be present in a valid request */
for(i=0; i<req->NumParams; i++) {
if(strcasecmp(req->ParamNames[i], "VERSION") == 0)
- {
- nVersion = msOWSParseVersionString(req->ParamValues[i]);
- if (nVersion == -1)
- return msWMSException(map, OWS_1_1_1, NULL); /* Invalid format */
- }
+ version = req->ParamValues[i];
else if (strcasecmp(req->ParamNames[i], "WMTVER") == 0 && nVersion == -1)
{
nVersion = msOWSParseVersionString(req->ParamValues[i]);
@@ -2927,6 +2923,10 @@
if (service != NULL && strcasecmp(service, "WMS") != 0)
return MS_DONE; /* Not a WMS request */
+ nVersion = msOWSParseVersionString(version);
+ if (nVersion == -1)
+ return msWMSException(map, OWS_1_1_1, NULL); /* Invalid format */
+
/*
** GetCapbilities request needs the service parametr defined as WMS:
see section 7.1.3.2 wms 1.1.1 specs for decsription.
More information about the mapserver-commits
mailing list