Commit 6a66844c authored by Alessandro CERIONI's avatar Alessandro CERIONI
Browse files

Fixing a regression, which prevented the detection of the KML and SOS services.

parent a1ce5aa9
......@@ -126,8 +126,17 @@ def fix_links( links, credentials=None ):
except Exception as e:
if link['protocol'] == "application/":
fixed_links[k]['protocol'] = 'KML'
if '/sos/' in link['url'].lower():
fixed_links[k]['protocol'] = 'SOS'
# ...otherwise, we make a guess on the basis of the information carried by the URL
known_formats = ['ecw', 'pdf', 'zip', 'kml', 'json', 'tif', 'tiff', 'csv'] # sos
known_formats = ['ecw', 'pdf', 'zip', 'json', 'tif', 'tiff', 'csv']
for known_format in known_formats:
if link['url'].lower().endswith(known_format):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment