fix(client): handle repeated pagination Link headers

Summary

Read every Link header field in wire order when populating pagination links. If a response sends rel="first" and rel="next" on separate lines, the client currently sees only the first line and keyset pagination stops after the first page.

RFC 9110 §5.2 specifies how to combine list field values. RFC 8288 §3 defines Link as a list field.

Validation

  • The new Projects.ListProjects / ScanAndCollect test returned only the first project with the original implementation. It returns both projects with the fix.
  • go test -race ./... and the repository's pinned golangci-lint passed. Pinned gofumpt and Git whitespace checks were clean.

Prepared with AI assistance.

Merge request reports

Loading
Loading