Skip to content

Implement q priority of request headers #1952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webb-ben
Copy link
Member

@webb-ben webb-ben commented Mar 5, 2025

Overview

Create common util functions get_choice_from_headers and get_from_headers to get value from header in case insensitive way and implement q priority sorting for header values. This logic is then applied to all headers that pygeoapi accepts q value ranking for: Accept and Accept-Language.

Related Issue / discussion

Closes #1948
Closes #1591

Additional information

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@webb-ben webb-ben requested a review from a team March 5, 2025 02:50
@webb-ben webb-ben changed the title Implement q priority sorting of requests Implement q priority of request headers Mar 5, 2025
@webb-ben webb-ben added the enhancement New feature or request label Mar 5, 2025
@webb-ben webb-ben force-pushed the evaluate-priority-headers branch from b070491 to 5b92f8d Compare March 5, 2025 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant