-
Notifications
You must be signed in to change notification settings - Fork 221
[bug] Rewriting link headers is wrong #1100
Copy link
Copy link
Closed
Labels
Description
On Github if we request:
http --print h GET https://api.github.com/repos/webcompat/webcompat-tests/issues/398/comments 'Accept:application/json' | grep Link
we get
Link: <https://api.github.com/repositories/17839063/issues/398/comments?page=2>; rel="next", <https://api.github.com/repositories/17839063/issues/398/comments?page=4>; rel="last"
Then
→ http --print h GET 'https://api.github.com/repos/webcompat/webcompat-tests/issues/398/comments?page=2' 'Accept:application/json' | grep Link
Link: <https://api.github.com/repositories/17839063/issues/398/comments?page=3>; rel="next", <https://api.github.com/repositories/17839063/issues/398/comments?page=4>; rel="last", <https://api.github.com/repositories/17839063/issues/398/comments?page=1>; rel="first", <https://api.github.com/repositories/17839063/issues/398/comments?page=1>; rel="prev"
BUT
on webcompat.
we do
→ http --print h GET 'http://localhost:5000/api/issues/398/comments' 'Accept:application/json'
link: <comments?page=2>; rel="next", <comments?page=4>; rel="last"
Then
→ http --print h GET 'http://localhost:5000/api/issues/398/comments?page=2' 'Accept:application/json'
link: <comments?page=2>; rel="next", <comments?page=4>; rel="last"
Reactions are currently unavailable