jira-cli: 302 Redirects Not Followed
Describe the bug
jira-cli
doesn’t follow redirect’s when presented with 302’s.
Please provide following details
- JiraCLI Version:
(Version="1.2.0", GitCommit="9d8a0afd75b68aa519367f93c240429117cc4090", CommitDate="2022-12-16T10:53:08+00:00", GoVersion="go1.18.3", Compiler="gc", Platform="darwin/arm64")
- Are you using Jira cloud or on-premise jira server? Also mention the version for on-premise installation.
On prem. JiraVersion value=8.20.14
- What operating system are you using? Also mention version.
macOS 13.1
- What terminal are you using? Also mention version.
iTerm2 Build 3.5.0beta8
To Reproduce
Steps to reproduce the behavior:
jira ...
(e.g.jira serverinfo --debug
)- Get 302
- Curl equivalent command (e.g. `curl --request GET -H “Authorization: Bearer $JIRA_API_TOKEN” --url ‘https://ad.astra.com/do/secure/rest/api/2/search?jql=project%3D%<redacted>%22+ORDER+BY+created+DESC&startAt=0&maxResults=100’)
- Get 302
- Curl with
-L
to follow forwarding requests (e.g.curl -L --request GET -H "Authorization: Bearer $JIRA_API_TOKEN" --url 'https://ad.astra.com/do/secure/rest/api/2/search?jql=project%3D%<redacted>%22+ORDER+BY+created+DESC&startAt=0&maxResults=100
) - Get requested data
Expected behavior 302’s and 301’s should be followed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (5 by maintainers)
I hit the 302 redirect issue and the proposed patch works for me.