Skip to content

Commit

Permalink
Merge pull request #15 from steingod/master
Browse files Browse the repository at this point in the history
Fixed TDS v5 and HYRAX catalog traversing issue
  • Loading branch information
cehbrecht authored Oct 30, 2023
2 parents 0459a4e + d0cbd2e commit 441e727
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions threddsclient/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import logging
logger = logging.getLogger(__name__)

FILE_SERVICE = "HTTPServer"
OPENDAP_SERVICE = "OPENDAP"
WMS_SERVICE = "WMS"
WCS_SERVICE = "WCS"
FILE_SERVICE = ["HTTPServer"]
OPENDAP_SERVICE = ["OPENDAP","OpenDAP"]
WMS_SERVICE = ["WMS"]
WCS_SERVICE = ["WCS"]


class Node(object):
Expand Down Expand Up @@ -93,8 +93,10 @@ def authority(self):
@property
def service_name(self):
service_name = None
if self.soup.get('servicename'):
service_name = self.soup.get('servicename')
if self.soup.servicename:
service_name = self.soup.servicename.text
elif self.soup.serviceName:
service_name = self.soup.serviceName.text
elif self.soup.metadata:
if self.soup.metadata.serviceName:
service_name = self.soup.metadata.serviceName.text
Expand Down Expand Up @@ -168,7 +170,7 @@ def __init__(self, soup, catalog):
def access_url(self, service_type=FILE_SERVICE):
url = None
for service in self.catalog.get_services(self.service_name):
if service.service_type == service_type:
if service.service_type in service_type:
url = urlparse.urljoin(service.url, self.url_path)
break
return url
Expand Down

0 comments on commit 441e727

Please sign in to comment.