Skip to content

content negotiation should check first matching #577

@pvgenuchten

Description

@pvgenuchten

Description
if you send a combined accept header of plain/text, application/ld+json a json response is returned (i guess json is the catch all format returned for unknown encodings). Expected is to return a json-ld encoding as it is the first match with any of the encodings available in pygeoapi

Steps to Reproduce
I used poster in chrome to send various accept headers
I arrived at this issue when testing microdata using http://linter.structured-data.org, they send a long accept header with various ld types and html, but json is returned, leading to a parse error

Expected behavior
pygeoapi returns the encoding for which it finds the first match in the list of requested and available encodings

Screenshots/Tracebacks

image

image

Environment

  • pygeoapi version: .8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssue marked stale by stale-bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions