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

Smarter href construction for clients #405

Merged
merged 6 commits into from
Jan 19, 2023
Merged

Smarter href construction for clients #405

merged 6 commits into from
Jan 19, 2023

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Jan 17, 2023

Related Issue(s):

Description:

To protect against double-slashes in constructed urls, we stripped trailing slashes from a client's self href (#373). However, as @m-mohr, some server implementations require the trailing slash. This PR removes the rstrip("/"), and instead constructs hrefs a bit more intelligently to guard against double-slashes.

Includes two tiny spelling fixes to docstrings.

PR Checklist:

  • Code is formatted
  • Tests pass
  • Changes are added to the CHANGELOG

@gadomski gadomski added this to the 0.5.2 milestone Jan 17, 2023
@gadomski gadomski requested a review from m-mohr January 17, 2023 15:40
@gadomski gadomski self-assigned this Jan 17, 2023
pystac_client/client.py Outdated Show resolved Hide resolved
@gadomski gadomski marked this pull request as draft January 17, 2023 18:54
@gadomski gadomski marked this pull request as ready for review January 18, 2023 13:02
@gadomski gadomski requested a review from m-mohr January 18, 2023 13:02
pystac_client/client.py Outdated Show resolved Hide resolved
@gadomski gadomski marked this pull request as draft January 18, 2023 13:13
@gadomski gadomski marked this pull request as ready for review January 18, 2023 13:25
pystac_client/client.py Outdated Show resolved Hide resolved
pystac_client/client.py Outdated Show resolved Hide resolved
pystac_client/client.py Outdated Show resolved Hide resolved
gadomski and others added 3 commits January 19, 2023 05:38
Co-authored-by: Abhishek Manandhar <abhishek.adams@gmail.com>
Co-authored-by: Abhishek Manandhar <abhishek.adams@gmail.com>
@gadomski gadomski merged commit 9c15b5a into main Jan 19, 2023
@gadomski gadomski deleted the smarter-root-href branch January 19, 2023 12:47
@gadomski gadomski modified the milestones: 0.5.2, 0.6.0 Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants