8000 normalize url paths before making a request · Issue #1 · go-jira/jira · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

normalize url paths before making a request #1

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

Closed
jaybuff opened this issue Feb 15, 2015 · 3 comments
Closed

normalize url paths before making a request #1

jaybuff opened this issue Feb 15, 2015 · 3 comments

Comments

@jaybuff
Copy link
Contributor
jaybuff commented Feb 15, 2015

https://issues.apache.org/jira//rest/api/2/issue/MESOS-1123 returns a 404, but https://issues.apache.org/jira/rest/api/2/issue/MESOS-1123 works :(

I had this problem with this config:

$ cat ~/.jira.d/config.yml
endpoint: https://issues.apache.org/jira/

Perhaps you can simply strip any trailing slashes from endpoint if they exists.

@jaybuff
Copy link
Contributor Author
jaybuff commented Feb 15, 2015

I looked, net/url doesn't have a normalize function (bummer). I found https://github.com/PuerkitoBio/purell but it's just a bunch of regexes and it's complete overkill.

@coryb
Copy link
Contributor
coryb commented Feb 16, 2015

It might be easier to just trim off any trailing / when I read the endpoint property from the config files, I try to find something.
Thanks,
-Cory

coryb added a commit that referenced this issue Feb 16, 2015
@coryb
Copy link
Contributor
coryb commented Feb 16, 2015

I just went with a simple TrimRight, seems to work.
-Cory

@coryb coryb closed this as completed Feb 16, 2015
pdericson pushed a commit to pdericson/go-jira that referenced this issue Sep 14, 2017
coryb pushed a commit that referenced this issue Nov 30, 2018
coryb added a commit that referenced this issue Nov 30, 2018
docs: Fix grammar typos (#1)
5D3B
jenic pushed a commit to jenic/go-jira that referenced this issue Feb 6, 2025
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

No branches or pull requests

2 participants
0