Skip to content

pygeoapi does not respect header q values #1948

@webb-ben

Description

@webb-ben

Description
When sending a request to pygeoapi with multiple values in accept parameter, pygeoapi takes the first item instead of evaluating the q values of all options sent in the header.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Send a request to pygeoapi with variable q values, and a lower q value as your first header:
    Accept: application/json;q=0.5,application/ld+json;q=1
  2. View response content format

Expected behavior
pygeoapi evaluates the full header context to decide the most appropriate header to send in the response.

Screenshots/Tracebacks
If applicable, add screenshots to help explain your problem.

Environment

  • OS: linux
  • Python version: 3.10/3.12
  • pygeoapi version: 0.20.dev0

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions