[RTFACT-12694] Nuget - correct implementation of the $top query param Created: 19/Oct/16  Updated: 14/Nov/17  Resolved: 23/Nov/16

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NuGet
Affects Version/s: 4.13.2, 4.14.1
Fix Version/s: 4.14.2

Type: Bug Priority: High
Reporter: Uriah Levy Assignee: Shay Yaakov (Inactive)
Resolution: Fixed Votes: 3
Labels: None

Issue Links:
Duplicate
Relationship
relates to RTFACT-12379 NuGet skip logic is omitting results ... Resolved

 Description   

Artifactory currently sends back the $skip link on queries that have the $top param - this is not inline with with how the gallery handles $top queries and confuses the client.

For example, if the client sends a first request with $top=30, and we give it back a next page link with $skip=80, we lose 50 results beacuse the client follows the pagination link instead of using its own logic for pagination (which is skipping 30 results at a time in correspondence to the $top value).

To reproduce, use the attached script on https://www.jfrog.com/jira/browse/RTFACT-12379 to upload some versions and use this command:

nuget.exe list -allversions -Source http://localhost:8080/artifactory/api/nuget/nuget-local -verbosity detailed

On mac:
mono --runtime=v4.0.30319 path/to/nuget.exe list -allversions -Source http://localhost:8080/artifactory/api/nuget/nuget-local -verbosity detailed

See that the first request asks for $top=30 and contains a link to the next page with $skip=80, effectively skipping 50 results


Generated at Wed Aug 21 12:05:23 UTC 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.