Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure client self hrefs don't end in '/' #373

Merged
merged 6 commits into from
Dec 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove multiple / characters from url
Co-authored-by:  Tom Augspurger <[email protected]>
  • Loading branch information
gadomski and TomAugspurger committed Dec 12, 2022
commit 9a57781d06cfaa92f572e06f7bde0103bb65779e
3 changes: 1 addition & 2 deletions pystac_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ def open(
Return:
catalog : A :class:`Client` instance for this Catalog/API
"""
if url.endswith("/"):
url = url[0:-1]
url = url.rstrip("/")
client: Client = cls.from_file(
url, headers=headers, parameters=parameters, modifier=modifier
)
Expand Down