MapServer / MapServer-import

3 stars 2 forks source link

Error parsing VERSION parameter in WMS CONNECTION if LAYER name contains '.' #1996

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: dmorissette Date: 2007/01/04 - 17:24

MapServer throws the following error when we use a WMS CONNECTION string that
contains a layer name with a "." in it:

msBuildWMSLayerURL(): WMS connection error. MapServer supports only WMS 1.0.0 to
1.1.1 (please verify the VERSION parameter in the connection string).
msOWSParseVersionString(): WMS server error. Invalid version
(1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=popp.lace&STYLES=&FORMAT=image/png).
OWS version must be in the format 'x.y' or 'x.y.z'

Here is a layer definition to reproduce:

LAYER
  DEBUG TRUE
  NAME popplace3
  TYPE RASTER
  STATUS ON
  CONNECTIONTYPE WMS
  CONNECTION
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=popp.lace&STYLES=&FORMAT=image/png"
  METADATA
    "wms_srs"               "EPSG:42304"
  END
END # Layer

... if we remove the "." in popp.lace then and all is good. 

Notice the error message seems to be related to the VERSION keyword not being
parsed properly.
tbonfort commented 12 years ago

Author: dmorissette Date: 2007/01/04 - 17:27

Reassigned to myself
tbonfort commented 12 years ago

Author: dmorissette Date: 2007/01/04 - 20:12

There was a lazy bit of code that didn't care to look for an '&' delimiter when
extracting VERSION from the CONNECTION strings. That worked fine as long as
there was not any "." in the rest of the URL.

Fixed in 4.99 dev (cvs trunk) and 4.10 branch (will be in 4.10.1).There was a
lazy bit of code that didn't care to look for an '&' delimiter when extracting
version from the CONNECTION strings. That worked fine as long as there was not
any "." in the rest of the URL.

Fixed in 4.99 dev (cvs trunk) and 4.10 branch (will be in 4.10.1).