Skip to content

QGIS server OGC API: Limits and offset parameters ignored when plugin changing parameters #65858

Description

@MarcelGeo

What is the bug or the crash?

When a QGIS Server plugin calls self.serverInterface().requestHandler().setParameter() in
onRequestReady, the limit and offset parameters of an OGC API - Features
/collections/{id}/items request are silently ignored and the response always returns the
first 10 features (the default). This breaks pagination over items, where just first 10 items is always returned.

Without the plugin active (or without the setParameter() call), limit and offset work
correctly.

Calling requestHandler().setParameter() in a server plugin should not affect unrelated URL
parameters. OGC API - Features should correctly accept limit and offset regardless of
whether a plugin modifies the request.

Steps to reproduce the issue

  1. Install a server plugin that calls requestHandler().setParameter(key, value) in
    onRequestReady for any key.
  2. Make a request to /collections/{id}/items?limit=50&offset=20.
  3. Observe that the response returns the first 10 features instead of 50 features starting
    at offset 20.

Versions

3.40, 3.44

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

No Duplicate of the Issue

  • I have verified that there are no existing issues raised related to my problem.

Additional context

In more detail, the case sensitivity of LIMIT and OFFSET changes when request parameters are modified. The QGIS server code itself does not recognize the request parameters when their casing is changed using setParameter.

Metadata

Metadata

Assignees

Labels

BugEither a bug report, or a bug fix. Let's hope for the latter!ServerRelated to QGIS server

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions