Skip to content
Snippets Groups Projects
Commit 72761fad authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Prevent the ? from being added twice when requesting OGC endpoints.

parent c91f87ec
Branches
Tags
No related merge requests found
......@@ -119,19 +119,24 @@ def analyze_wcs_capabilities( capabilities, the_layer ):
def get_capabilities( root_url, service, working_directory ):
if root_url.endswith('?'):
local_root_url = root_url
else:
local_root_url = root_url + '?'
if service == 'wms':
url = root_url + '?version=1.3.0&service=WMS&request=GetCapabilities'
url = local_root_url + 'version=1.3.0&service=WMS&request=GetCapabilities'
md5 = hashlib.md5( root_url.encode("utf-8") ).hexdigest()
filename = os.path.join( working_directory, 'WMS_Capabilities_%s.xml' % md5)
elif service == 'wfs':
url = root_url + '?request=GetCapabilities&service=WFS'
url = local_root_url + 'request=GetCapabilities&service=WFS'
md5 = hashlib.md5( root_url.encode("utf-8") ).hexdigest()
filename = os.path.join( working_directory, 'WFS_Capabilities_%s.xml' % md5)
elif service == 'wcs':
url = root_url + '?version=1.1.0&service=WCS&request=DescribeCoverage'
url = local_root_url + 'version=1.1.0&service=WCS&request=DescribeCoverage'
md5 = hashlib.md5( root_url.encode("utf-8") ).hexdigest()
filename = os.path.join( working_directory, 'WCS_Capabilities_%s.xml' % md5)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment