Open ewf-devops opened 4 years ago
Original comment by John Henderson (Bitbucket: [John Henderson](https://bitbucket.org/John Henderson), GitHub: jrhender).
@{5efc3c2c54020e0ba82c6e64} I’m trying to understand this bug a little better. What do you mean by “url-encoded parameters”? Do you mean the route/path components (e.g. the page/3
component from the example that you gave in the issue description) ?
Original comment by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley).
So the url parameters like ?limit=50&offset=100
which are set by the recipient of a paginated request, are not sent back to the sender. They receive the resource proxied by the OCN Node (parameters are replaced with /page/n
). They therefore have no idea what they are requesting on the next page (i.e. the offset, the request limit, the total number of resources).
Original report by Adam Staveley (Bitbucket: [Adam Staveley](https://bitbucket.org/Adam Staveley), GitHub: adamstaveley).
When receiving a “proxied” pagination response “Link” header, i.e.
Link: <https://node.ocn.net/ocpi/sender/2.2/locations/page/2>; rel=”next”
, the recipient receives no information in the URL about the url-encoded parameters which will be used in the next request.As an example, if the sender requests
https://node.ocn.net/ocpi/sender/2.2/locations?offset=50
the response header should contain the values set by the recipient.Therefore, a header
Link: <https://server.cpo.com/ocpi/sender/2.2/locations?offset=100>; rel=”next”
should be converted by the OCN Node toLink: <https://node.ocn.net/ocpi/sender/2.2/locations/page/3?offset=100>; rel=”next”
.