[GRASS-SVN] r37081 - grass/trunk/scripts/r.in.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 9 14:36:11 EDT 2009
Author: martinl
Date: 2009-05-09 14:36:11 -0400 (Sat, 09 May 2009)
New Revision: 37081
Modified:
grass/trunk/scripts/r.in.wms/r.in.wms.py
Log:
r.in.wms: check if getcapabilities()
Modified: grass/trunk/scripts/r.in.wms/r.in.wms.py
===================================================================
--- grass/trunk/scripts/r.in.wms/r.in.wms.py 2009-05-09 18:17:49 UTC (rev 37080)
+++ grass/trunk/scripts/r.in.wms/r.in.wms.py 2009-05-09 18:36:11 UTC (rev 37081)
@@ -201,6 +201,10 @@
except IOError:
grass.fatal("Unable to get capabilities of '%s'" % options['mapserver'])
+ # check DOCTYPE first
+ if cap_file.info()['content-type'] != 'application/vnd.ogc.wms_xml':
+ grass.fatal("Unable to get capabilities: %s" % url)
+
# parse file with sax
cap_xml = wms_parse.ProcessCapFile()
try:
More information about the grass-commit
mailing list