Skip to content

Charset in accept makes the server ignore the entire media-type requested #4676

Open

Description

Describe the bug
When sending the charset alongside the media-type in the accept-header, the entire header is ignored.
If sending "Accept: application/fhir+xml;charset=UTF-8" I get a json response.
Sending "Accept: application/fhir+xml" or "Accept: application/fhir+xml;q=0.8" I correctly get xml.

According to the standard https://www.[iana.org/assignments/media-types/application/fhir+xml](https://www.iana.org/assignments/media-types/application/fhir+xml) it's an accepted parameter for this media-type

FHIR Version?
Stu3/R4/R5 -> all

Data provider?
CosmosDB/SQL Server -> both

To Reproduce
Steps to reproduce the behavior:

  1. Send a request with the header "Accept: application/fhir+xml;charset=UTF-8"

Expected behavior
An xml result

Actual behavior
JSON result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Up for grabsThe issue require minimal context and is well-suited for new contributors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions