You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support legacy (Datasync/Zumo ≤ v6) clients that expect a relative nextLink #629
TableController<TEntity>.QueryAsync builds PagedResult.NextLink as a query string only (for example $skip=50&$top=50). Datasync v6 clients (and earlier) resolve nextLink against the host root, not against the table URL. They also send the X-ZUMO-OPTIONS: nextLink=path header to indicate this. A query-only nextLink makes those clients request the wrong URL, so paging fails once a result set exceeds PageSize.
To Reproduce
Host a table controller using CommunityToolkit.Datasync.Server with more rows than Options.PageSize.
Query it from a v6 client, which sends the header X-ZUMO-OPTIONS: nextLink=path.
Inspect nextLink in the response and let the client follow it.
The client doesn't request tables/<table>?$skip=..., so paging fails.
Expected behavior
When the request carries X-ZUMO-OPTIONS containing nextLink=path, the server returns nextLink as a path relative to the host root, with no leading slash: tables/<table>?$skip=50&$top=50.
Other clients keep receiving the current query-only format, so there is no breaking change.
Proposed change
In TableController.Query.cs:
Add IsLegacyClient(HttpRequest). It returns true when the X-ZUMO-OPTIONS header contains nextLink=path (case-insensitive).
Change CreateNextLink(...) to take a bool legacyClient parameter.
If it's false, return the query string (TrimStart('?')) as before.
If it's true, return (request.PathBase + request.Path).Value.Trim('/') + queryString.
Compute legacyClient once in QueryAsync and pass it to CreateNextLink.
Activity