unioslo / harborapi

Python async client for the Harbor REST API v2.0.
https://unioslo.github.io/harborapi/
MIT License
28 stars 6 forks source link

Fails to parse next pagination link when query contains spaces #36

Closed pederhan closed 1 year ago

pederhan commented 1 year ago

A "Link" header with the value

'</api/v2.0/audit-logs?page=2&page_size=10&q=operation={push pull},resource_type=artifact>; rel="next"'

fails due to the presence of a space in the operation query param value. The regex that was ripped from GitHub's own API documentation does not account for the presence of a space in the query itself. The regex must not split on whitespace inside the <> delimiters.