Ticket #1996 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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

Reported by: dmorissette Owned by: dmorissette
Priority: high Milestone:
Component: WMS Client Version: unspecified
Severity: normal Keywords:
Cc: havard.tveite@…, mapserver@…

Description

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.

Change History

Changed 6 years ago by dmorissette

  • cc assefa@… added

Changed 6 years ago by dmorissette

  • owner changed from mapserverbugs to dmorissette
Reassigned to myself

Changed 6 years ago by dmorissette

  • cc havard.tveite@… added

Changed 6 years ago by mapserver@…

  • cc mapserver@… added

Changed 6 years ago by dmorissette

  • status changed from new to closed
  • resolution set to fixed
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).
Note: See TracTickets for help on using tickets.