Skip to content

Commit

Permalink
Merge 402552e into cdcfce7
Browse files Browse the repository at this point in the history
  • Loading branch information
pvgenuchten committed Apr 4, 2024
2 parents cdcfce7 + 402552e commit 5105044
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions owslib/catalogue/csw2.py
Expand Up @@ -661,15 +661,16 @@ def _invoke(self):
post_verbs = [x for x in op.methods if x.get('type').lower() == 'post']
if len(post_verbs) > 1:
# Filter by constraints. We must match a PostEncoding of "XML"
foundXML = False
for pv in post_verbs:
for const in pv.get('constraints'):
if const.name.lower() == 'postencoding':
values = [v.lower() for v in const.values]
if 'xml' in values:
request_url = pv.get('url')
foundXML = True
break
else:
# Well, just use the first one.
if not foundXML: # Well, just use the first one.
request_url = post_verbs[0].get('url')
elif len(post_verbs) == 1:
request_url = post_verbs[0].get('url')
Expand Down

0 comments on commit 5105044

Please sign in to comment.