Skip to content

[Bug] VersityGW uses last key as continuation token which breaks Azure Go SDK pagination #1457

@nitinosiris

Description

@nitinosiris

Description

When using VersityGW with Azure Blob Storage as the backend and setting MaxKeys (e.g., to 2) while having more objects (e.g., 4), the first ListObjectsV2 call succeeds. However, the gateway returns the last key as the continuation token, and passing this token to the next call causes the Azure API to throw 400 Bad Request with InvalidQueryParameterValue.

Steps to Reproduce

  1. Deploy VersityGW configured to use Azure Blob Storage as the backend.
  2. Upload 4 objects to the bucket.
  3. Call ListObjectsV2 with MaxKeys = 2.
  4. Observe that the response returns the last object's key as ContinuationToken.
  5. Use that token in the next ListObjectsV2 call — the response results in an error.

Expected Behavior

Azure’s pagination requires using the provided NextMarker from Azure responses, not simply the last retrieved key. If Azure returns a NextMarker, it should be used as the continuation token going forward.

Actual Behavior

VersityGW incorrectly uses the last key (from listing results) as the continuation token, rather than the Azure-provided NextMarker, causing invalid queries when passed to Azure.

Refer #1410

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions