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

API /issues endpoint doesn't not propograte query parameters in pagination links #7296

Closed
1 of 3 tasks
jerrykan opened this issue Jun 26, 2019 · 0 comments · Fixed by #7298
Closed
1 of 3 tasks

API /issues endpoint doesn't not propograte query parameters in pagination links #7296

jerrykan opened this issue Jun 26, 2019 · 0 comments · Fixed by #7298
Labels
Milestone

Comments

@jerrykan
Copy link

  • Gitea version (or commit ref): 1.9.0+dev-377-g5908bb103
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

When making an API request to the /issues endpoint the query string parameters are not propagated to in the URLs provided in the Link response header.

curl -I -H  "accept: application/json" -H  "authorization: Basic XXXXXX" -X GET "https://try.gitea.io/api/v1/repos/jerrykan/example-repo/issues?state=all"
HTTP/2 200 
content-type: application/json; charset=UTF-8
date: Wed, 26 Jun 2019 02:07:50 GMT
link: <https://try.gitea.io/api/v1/repos/jerrykan/example-repo/issues?page=2>; rel="next",<https://try.gitea.io/api/v1/repos/jerrykan/example-repo/issues?page=3>; rel="last"
set-cookie: XXXXXX
set-cookie: XXXXXX
set-cookie: XXXXXX
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN

I would expect the Link response header to instead be something like:

link: <https://try.gitea.io/api/v1/repos/jerrykan/example-repo/issues?page=2?state=all>; rel="next",<https://try.gitea.io/api/v1/repos/jerrykan/example-repo/issues?page=3?state=all>; rel="last"
@lunny lunny added the type/bug label Jun 26, 2019
@lunny lunny added this to the 1.9.0 milestone Jun 26, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants