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

fix: normalize remote service endpoint #7828

Merged
merged 6 commits into from
Jan 28, 2021

Conversation

lidel
Copy link
Member

@lidel lidel commented Dec 14, 2020

Closes #7826 reported by @Gozala, needed for 0.8.0 (#7707)

This PR adds URI normalization for HTTP-based remote pinning service endpoint and applies it:

  1. before endpoint is stored in $IPFS_PATH/config (when user adds via pin remote service add)
  2. after endpoint is read from config (in case someone entered it up manually)

ps. alternative approach is to address this upstream in go-pinning-service-http-client, but by doing it in pin remote command code we ensure invalid/malformed URIs are not saved to the config file, which is a better UX.

@lidel lidel marked this pull request as ready for review December 14, 2020 19:46
@lidel lidel added the need/review Needs a review label Dec 15, 2020
lidel added a commit that referenced this pull request Dec 15, 2020
Copy link
Member Author

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, ship it

@aschmahmann aschmahmann merged commit 89ef0d1 into master Jan 28, 2021
@aschmahmann aschmahmann deleted the fix/normalize-service-endpoint branch January 28, 2021 16:17
kingwel-xie pushed a commit to kingwel-xie/go-ipfs that referenced this pull request Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote pinning service registered with trailing / are not handled propely
2 participants